Karya, built on 2018-05-31T02:46:59 (patch 0a1a35479c514820d77330ae8a978975ba22a47a)

Safe HaskellNone

Util.CallStack

Description

Utilities for GHC's implicit call stacks feature.

Synopsis

Documentation

type Stack = Stack.HasCallStack Source #

Add this to the context of a function to give stack-aware functions access to its caller.

data Caller Source #

Simplified stack with just the immediate caller.

Constructors

Caller !FilePath !Int 
NoCaller 
Instances
Eq Caller # 
Instance details

Defined in Util.CallStack

Methods

(==) :: Caller -> Caller -> Bool #

(/=) :: Caller -> Caller -> Bool #

Read Caller # 
Instance details

Defined in Util.CallStack

Show Caller # 
Instance details

Defined in Util.CallStack

ToJSON Caller # 
Instance details

Defined in Util.CallStack

FromJSON Caller # 
Instance details

Defined in Util.CallStack

Serialize Caller # 
Instance details

Defined in Util.Serialize

errorStack :: Stack => Text -> a Source #

Just like error, except show the caller's location.

errorIO :: Stack => MonadIO m => Text -> m a Source #

Like errorStack, except run in IO.

throw :: (Stack, Exception e) => (Text -> e) -> Text -> a Source #