{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module System.FS.CallStack (
prettyCallStack
, PrettyCallStack
, HasCallStack
) where
import GHC.Stack (CallStack, HasCallStack)
import qualified GHC.Stack as GHC
newtype PrettyCallStack = PrettyCallStack CallStack
instance Show PrettyCallStack where
show :: PrettyCallStack -> String
show (PrettyCallStack CallStack
cs) = CallStack -> String
GHC.prettyCallStack CallStack
cs
prettyCallStack :: HasCallStack => PrettyCallStack
prettyCallStack :: HasCallStack => PrettyCallStack
prettyCallStack = CallStack -> PrettyCallStack
PrettyCallStack CallStack
HasCallStack => CallStack
GHC.callStack