effectful-core-2.2.2.0: An easy to use, performant extensible effects library.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Effectful.Dispatch.Static.Unsafe

Description

Unsafe utilities for statically dispatched effects.

Synopsis

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 pure Eff 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 pure Eff computations.
  • Unlifted Eff computations must not be run in a thread distinct from the caller of reallyUnsafeUnliftIO, but it's not checked anywhere.

If you disregard the second point, segmentation faults await.