pure -package:inline-c

Lift a value into the Structure.

Examples

>>> pure 1 :: Maybe Int
Just 1
>>> pure 'z' :: [Char]
"z"
>>> pure (pure ":D") :: Maybe [String]
Just [":D"]
Lift a value.
Create an exceptional value without exception.
Lifted pure.
pure, but taking explicit add and zero.
pure, but with Num constraints instead of Backprop constraints.
Note that this tends to make little sense for non-endofunctors. Consider using constPure instead.
Lift a value.
This module supplies a 'pure' monad transformer that can be used for mock-testing code that throws exceptions, so long as those exceptions are always thrown with throwM. Do not mix CatchT with IO. Choose one or the other for the bottom of your transformer stack!