yukikurage / purescript-jelly

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make custom monads available.

yukikurage opened this issue · comments

I'd like to do away with contexts and allow custom monads to be used in apps like Halogen.
I think this requires abstraction of operations, but I have no idea how to do it...

This seems a bit difficult, so I'll give up on including it in v0.7.

I think this class is important. 🤔

class MonadEffect m <= MonadSequenceSignal m where
  sequenceSignal :: Signal (m a) -> m (Signal a)

This indicates that the Signal can be unwrapped.
If this can be done, arbitrary Hooks could be embedded.

The problem is that if m is a MonadSequenceSignal, then FreeT f m must also be a MonadSequenceSignal.
This is because it allows the Component to be a MonadSequenceSignal as well.