open-witness-0.3.1: open witnesses

Safe HaskellNone
LanguageHaskell2010

Data.OpenWitness

Synopsis

Documentation

data OpenWitness s a Source

A witness type that can witness to any type. But values cannot be constructed; they can only be generated in IO and certain other monads.

Instances

data RealWorld Source

The s type for running OW in IO.

newIOWitness :: forall a. IO (IOWitness a) Source

Generate a new IOWitness in IO.

data OW s a Source

A runnable monad in which OpenWitness values can be generated. The s parameter plays the same role as it does in ST, preventing OpenWitness values from one run being used in another.

Instances

newOpenWitnessOW :: forall s a. OW s (OpenWitness s a) Source

Generate a new OpenWitness in OW.

runOW :: forall a. (forall s. OW s a) -> a Source

Run an OW computation.

owToIO :: OW RealWorld a -> IO a Source

Run an OW computation in IO.

iowitness :: TypeQ -> Q Exp Source

Template Haskell function to declare IOWitness values.