incipit-core-0.1.0.0: A Prelude for Polysemy
Safe HaskellNone
LanguageHaskell2010

Incipit

Description

This is the central module on which to build upon when constructing Preludes for Polysemy libraries. It reexports most core effects.

Synopsis

Documentation

module Polysemy

type (++) a b = Append a b infixr 5 Source #

Convenience type alias for concatenating two effect rows.

tryAny :: Member (Embed IO) r => IO a -> Sem r (Either Text a) Source #

Run an IO via Embed and catch all exceptions, returning Either.

tryMaybe :: Member (Embed IO) r => IO a -> Sem r (Maybe a) Source #

Run an IO via Embed and catch all exceptions, returning Maybe.

ignoreException :: Member (Embed IO) r => IO () -> Sem r () Source #

Run an IO via Embed and catch and ignore all exceptions.

send :: forall e (r :: [(Type -> Type) -> Type -> Type]) a. Member e r => e (Sem r) a -> Sem r a #

Embed an effect into a Sem. This is used primarily via makeSem to implement smart constructors.