polysemy-1.6.0.0: Higher-order, low-boilerplate free monads.
Safe HaskellNone
LanguageHaskell2010

Polysemy.IO

Synopsis

Interpretations

embedToMonadIO :: forall m r a. (MonadIO m, Member (Embed m) r) => Sem (Embed IO ': r) a -> Sem r a Source #

lowerEmbedded Source #

Arguments

:: (MonadIO m, Member (Embed IO) r) 
=> (forall x. m x -> IO x)

The means of running this monad.

-> Sem (Embed m ': r) a 
-> Sem r a 

Given some MonadIO m, interpret all Embed m actions in that monad at once. This is useful for interpreting effects like databases, which use their own monad for describing actions.

This function creates a thread, and so should be compiled with -threaded.

Since: 1.0.0.0