-
Following the documentation, which says:
which I then try to apply to a instance State s :> es => MonadState s (Eff es) where
get = send Get
put = send Put which results in:
I'm pretty sure I missed something, this case seems so basic that I must have overlooked something important, but I can't figure out what. Would you have any pointers? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Try instance (State s :> es, MonadState s (Eff s)) => MonadState s (Eff es) where
get = send Get
put = send Put |
Beta Was this translation helpful? Give feedback.
-
@ocharles is right, including the instance head in the context allows you to bypass the coverage condition. It's somewhat of a hack, but gets the job done. This is needed for any class that has fundeps. |
Beta Was this translation helpful? Give feedback.
Try