Created
October 8, 2017 00:57
-
-
Save wyager/c15c24888c017a66488e3d0f4d372905 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> import Control.Monad.Morph | |
> import Control.Monad.Except | |
> let wrap f = hoist (withExceptT f) | |
> :t wrap | |
wrap | |
:: (MFunctor t, Monad m) => | |
(e -> e') -> t (ExceptT e m) b -> t (ExceptT e' m) b | |
> let wrap = hoist . withExceptT | |
<interactive>:5:12: error: | |
• Couldn't match type ‘ExceptT e m0 a0 -> ExceptT e' m0 a0’ | |
with ‘forall a. m a -> n a’ | |
Expected type: (ExceptT e m0 a0 -> ExceptT e' m0 a0) | |
-> t m b -> t n b | |
Actual type: (forall a. m a -> n a) -> t m b -> t n b | |
• In the first argument of ‘(.)’, namely ‘hoist’ | |
In the expression: hoist . withExceptT | |
In an equation for ‘wrap’: wrap = hoist . withExceptT | |
• Relevant bindings include | |
wrap :: (e -> e') -> t m b -> t n b (bound at <interactive>:5:5) | |
> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment