-
| An example with runError and runState foo :: v -> Eff (State v : Error e : es) a -> Eff es (Either (CallStack, e) (a, v)) foo init_state f = runError (runState init_state f) -- This works with concrete type bar :: Eff (State v : Error e : es) a bar = undefined -- But with constraints there is a problem (see below) bar :: (State v :> es, Error e :> es) => Eff es a bar = undefined baz :: forall es. Eff es (Either (CallStack, String) (Int, Double)) baz = foo 0.0 barHow can one use |
Beta Was this translation helpful? Give feedback.
Answered by arybczak Feb 28, 2024
Replies: 1 comment 1 reply
-
| You can either remove unused constraints from the signature of |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by flip111
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can either remove unused constraints from the signature of
baror use effectful-plugin for disambiguation.