Karya, built on 2020-11-26T21:03:17 (patch 23b5be2d53a9e8e7d6136cda5aae2849abe5cded)
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

Instances details
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 #