Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Unsafe utilities for statically dispatched effects.
Synopsis
- reallyUnsafeLiftMapIO :: (IO a -> IO b) -> Eff es a -> Eff es b
- reallyUnsafeUnliftIO :: ((forall r. Eff es r -> IO r) -> IO a) -> Eff es a
Documentation
reallyUnsafeLiftMapIO :: (IO a -> IO b) -> Eff es a -> Eff es b Source #
Utility for lifting IO
computations of type
IO
a ->IO
b
to
Eff
es a ->Eff
es b
This function is highly unsafe because:
- It can be used to introduce arbitrary
IO
actions into pureEff
computations. - The
IO
computation must not run its argument in a different thread, but it's not checked anywhere.
If you disregard the second point, segmentation faults await.
reallyUnsafeUnliftIO :: ((forall r. Eff es r -> IO r) -> IO a) -> Eff es a Source #
Create an unlifting function.
This function is highly unsafe because:
- It can be used to introduce arbitrary
IO
actions into pureEff
computations. - Unlifted
Eff
computations must not be run in a thread distinct from the caller ofreallyUnsafeUnliftIO
, but it's not checked anywhere.
If you disregard the second point, segmentation faults await.