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
I am not sure if this is possible. The first hurdle is getting an applicative and monad instance. The naive applicative implementation gives this error:
src/EIO.hs:54:15-54: error:
• Couldn't match type ‘e’ with ‘e <> e’
Expected: EIO e b
Actual: EIO (e <> e) b
‘e’ is a rigid type variable bound by
the instance declaration
at src/EIO.hs:53:10-28
• In the expression: af >>= \ f -> ax >>= \ x -> return (f x)
In an equation for ‘<*>’:
af <*> ax = af >>=\ f -> ax >>=\ x ->return (f x)
In the instance declaration for ‘Applicative (EIO e)’
• Relevant bindings include
ax ::EIO e a (bound at src/EIO.hs:54:10)
af ::EIO e (a -> b) (bound at src/EIO.hs:54:3)
(<*>) ::EIO e (a -> b) ->EIO e a ->EIO e b
(bound at src/EIO.hs:54:6)
|54| af <*> ax = af >>=\ f -> ax >>=\ x ->return (f x)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The text was updated successfully, but these errors were encountered:
I am not sure if this is possible. The first hurdle is getting an applicative and monad instance. The naive applicative implementation gives this error:
The text was updated successfully, but these errors were encountered: