operational-extra-0.4: Interpretation functions and simple instruction sets for operational

Safe HaskellSafe
LanguageHaskell2010

Control.Monad.Operational.Interpret

Documentation

data Around m instr Source #

Constructors

Around 

Fields

  • getAround :: forall a. instr a -> (m (), a -> m ())
     

Instances

Applicative m => Monoid (Around m instr) Source # 

Methods

mempty :: Around m instr #

mappend :: Around m instr -> Around m instr -> Around m instr #

mconcat :: [Around m instr] -> Around m instr #

data ApplyInstr m instr Source #

Constructors

ApplyInstr 

Fields

mapProgramT :: Monad m => (forall b. instr1 b -> instr2 b) -> ProgramT instr1 m a -> ProgramT instr2 m a Source #

hoistProgramT :: (Monad m, Monad n) => (forall a. m a -> n a) -> ProgramT instr m a -> ProgramT instr n a Source #

interpretWithMonadT :: forall instr m b. Monad m => (forall a. instr a -> m a) -> ProgramT instr m b -> m b Source #

interpretAroundMonadT :: forall instr m b. Monad m => Around m instr -> (forall a. instr a -> m a) -> ProgramT instr m b -> m b Source #