polysemy-resume-0.2.0.0: Polysemy error tracking
Safe HaskellNone
LanguageHaskell2010

Polysemy.Resume.Data.Stop

Description

 
Synopsis

Documentation

data Stop e :: Effect where Source #

An effect similar to Error without the ability to be caught. Used to signal that an error is supposed to be expected by dependent programs.

interpretStopper ::
  Member (Stop Boom) r =>
  InterpreterFor Stopper r
interpretStopper =
  interpret \case
    StopBang -> stop (Bang 13)
    StopBoom -> stop (Boom "ouch")

Constructors

Stop :: e -> Stop e m a 

Instances

Instances details
type DefiningModule Stop Source # 
Instance details

Defined in Polysemy.Resume.Data.Stop

type DefiningModule Stop = "Polysemy.Resume.Data.Stop"

stop :: forall e r a. MemberWithError (Stop e) r => e -> Sem r a Source #