Safe Haskell | None |
---|
operational
-style programs for MonadPlus
. See the
documentation for Control.Applicative.Operational and
Control.Monad.Operational for guidance on how to use this module.
Documentation
module Control.Operational.Class
newtype ProgramP instr a Source
Operational instr (ProgramP instr) | |
Monad (ProgramP instr) | |
Functor (ProgramP instr) | |
MonadPlus (ProgramP instr) | |
Applicative (ProgramP instr) | |
Alternative (ProgramP instr) |
interpretP :: forall m instr a. (Functor m, MonadPlus m) => (forall x. instr x -> m x) -> ProgramP instr a -> m aSource
fromProgramP :: (Operational instr m, Functor m, MonadPlus m) => ProgramP instr a -> m aSource
data ProgramViewP instr a whereSource
Return :: a -> ProgramViewP instr a | |
:>>= :: instr a -> (a -> ProgramP instr b) -> ProgramViewP instr b | |
MPlus :: [ProgramViewP instr a] -> ProgramViewP instr a |
view :: ProgramP instr a -> ProgramViewP instr aSource