Added HasCallStack constraint for trace functions (#55)

* added HasCallStack constraint for trace functions, for issue #39

* unpack string on 7.6
This commit is contained in:
Stephen Diehl
2017-05-31 10:13:08 +01:00
committed by GitHub
parent c2570f77e6
commit 46220a1a4a
7 changed files with 75 additions and 14 deletions
+18
View File
@@ -0,0 +1,18 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE ImplicitParams #-}
{-# LANGUAGE ConstraintKinds #-}
module CallStack
( HasCallStack
) where
#if MIN_VERSION_base(4,9,0)
import GHC.Stack (HasCallStack)
#elif MIN_VERSION_base(4,8,1)
import qualified GHC.Stack
type HasCallStack = (?callStack :: GHC.Stack.CallStack)
#else
import GHC.Exts (Constraint)
type HasCallStack = (() :: Constraint)
#endif