Works
This commit is contained in:
+3
-3
@@ -39,9 +39,9 @@ data Request = Request
|
||||
newtype Mealy eff a b = Mealy
|
||||
{ runMealy :: forall m. MonadFix m => (forall x. eff x -> m x) -> Request -> a -> m (b, Mealy eff a b) }
|
||||
|
||||
eff :: (a -> eff b) -> Mealy eff a b
|
||||
eff f = Mealy $ \nt _ x ->
|
||||
nt (f x) >>= \b -> pure (b, eff f)
|
||||
eff :: (Request -> a -> eff b) -> Mealy eff a b
|
||||
eff f = Mealy $ \nt req x ->
|
||||
nt (f req x) >>= \b -> pure (b, eff f)
|
||||
|
||||
instance Category (Mealy eff) where
|
||||
id = Mealy (\_ _ x -> pure (x, id))
|
||||
|
||||
Reference in New Issue
Block a user