You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be possible to make Run (state ∷ STATE s | r) instance of MonadState similar to how this has been done for MonadEff and MonadAff? I'm trying to use purescript-run with some lenses inside, and the lens functions (use, assign etc.) expect the state monad in their signatures.
The text was updated successfully, but these errors were encountered:
Yes, this is possible. We would have to move the state data types into Internal like I did for Choice, and then you could define state :: (s -> Tuple a s) -> Run (state :: STATE s | r) a in terms of get and modify. It's possible we could also just change the representation of the State functor.
I think I remember discussing doing this for State and some other effects in slack a while ago. I remember hearing it kind of defeated the point of extensible effects, so should this be closed?
Would it be possible to make
Run (state ∷ STATE s | r)
instance of MonadState similar to how this has been done forMonadEff
andMonadAff
? I'm trying to use purescript-run with some lenses inside, and the lens functions (use
,assign
etc.) expect the state monad in their signatures.The text was updated successfully, but these errors were encountered: