Module
Spork.Interpreter
- Package
- purescript-spork
- Repository
- natefaubion/purescript-spork
#Interpreter Source
newtype Interpreter m f i
An Interpreter takes inputs embedded in some functor f
and pushes them
out with effects m
.
Constructors
Interpreter (EventQueue m (f i) i)
#merge Source
merge :: forall i m g f. Applicative m => Interpreter m f i -> Interpreter m g i -> Interpreter m (Coproduct f g) i
Funnels two Interpreters into one by taking the Coproduct.
#liftNat Source
liftNat :: forall i m f. Monad m => (f ~> m) -> Interpreter m f i
Builds an Interpreter from a natural transformation.
#liftCont Source
liftCont :: forall i m f. Applicative m => (forall j. (j -> m Unit) -> f j -> m Unit) -> Interpreter m f i
Builds an Interpreter from callbacks.
#throughAff Source
throughAff :: forall i f eff. (f ~> (Aff eff)) -> (Error -> Eff eff Unit) -> Interpreter (Eff eff) f i
Interprets some functor f
into Aff
before running it.