| Safe Haskell | None |
|---|
Control.Alternative.Operational
Description
operational-style Alternative programs. See
Control.Applicative.Operational for guidance on how to use this
module.
Documentation
module Control.Operational.Class
newtype ProgramAlt instr a Source
Constructors
| ProgramAlt | |
Fields
| |
Instances
| Operational instr (ProgramAlt instr) | |
| Functor (ProgramAlt instr) | |
| Applicative (ProgramAlt instr) | |
| Alternative (ProgramAlt instr) |
interpretAlt :: forall instr f a. Alternative f => (forall x. instr x -> f x) -> ProgramAlt instr a -> f aSource
fromProgramAlt :: (Operational instr f, Alternative f) => ProgramAlt instr a -> f aSource
data ProgramViewAlt instr a whereSource
Constructors
| Pure :: a -> ProgramViewAlt instr a | |
| :<**> :: instr a -> ProgramViewAlt instr (a -> b) -> ProgramViewAlt instr b | |
| Empty :: ProgramViewAlt instr a | |
| :<|> :: ProgramViewAlt instr a -> ProgramViewAlt instr a -> ProgramViewAlt instr a |
viewAlt :: ProgramAlt instr a -> ProgramViewAlt instr aSource