This is more me needing help, than issues with the library, I think. :)
Middleware is like a StateT monad, but with it's state transition indexed.
newtype Middleware m i o a = Middleware (i → m (Tuple a o))
I've tried to implement IxMonadEff for it, but got stuck at this:
instance ixMonadEffMiddleware ∷ MonadEff e m ⇒ IxMonadEff e (Middleware m) where
iliftEff e = Middleware $ \s → do
x ← liftEff (runIxEff e)
pure (Tuple x s)
Could not match type
i1
with type
o2
The IxEff value describes a type transition i o in it's IxMonad instance, but that does not match Middleware in this case, as it does not change the indicies and it's state value. i o needs to be i i, I guess?
This is more me needing help, than issues with the library, I think. :)
Middleware
is like aStateT
monad, but with it's state transition indexed.I've tried to implement
IxMonadEff
for it, but got stuck at this:The
IxEff
value describes a type transitioni o
in it'sIxMonad
instance, but that does not matchMiddleware
in this case, as it does not change the indicies and it's state value.i o
needs to bei i
, I guess?Any ideas?