Created
May 18, 2018 10:36
-
-
Save robstewart57/1cb748f65066edc8818ee3b0de677be9 to your computer and use it in GitHub Desktop.
Applicative/Monad pure compilation issues
This file contains hidden or 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
ffBench.hs:34:25: | |
Could not deduce (Applicative m) arising from a use of ‘pure’ | |
from the context (Monad m) | |
bound by a type expected by the context: | |
Monad m => m s -> (s -> m ()) -> m b | |
at EffBench.hs:(33,20)-(34,34) | |
Possible fix: | |
add (Applicative m) to the context of | |
a type expected by the context: | |
Monad m => m s -> (s -> m ()) -> m b | |
or the type signature for fmap :: (a -> b) -> VSM s a -> VSM s b | |
or the instance declaration | |
In the expression: pure (f a) | |
In the second argument of ‘(>>=)’, namely ‘\ a -> pure (f a)’ | |
In the expression: g get put >>= \ a -> pure (f a) | |
EffBench.hs:38:30: | |
Could not deduce (Applicative m) arising from a use of ‘pure’ | |
from the context (Functor (VSM s)) | |
bound by the instance declaration at EffBench.hs:37:10-28 | |
or from (Monad m) | |
bound by a type expected by the context: | |
Monad m => m s -> (s -> m ()) -> m a | |
at EffBench.hs:38:12-35 | |
Possible fix: | |
add (Applicative m) to the context of | |
a type expected by the context: | |
Monad m => m s -> (s -> m ()) -> m a | |
or the type signature for pure :: a -> VSM s a | |
or the instance declaration | |
In the expression: pure a | |
In the second argument of ‘($)’, namely ‘\ get put -> pure a’ | |
In the expression: VSM $ \ get put -> pure a | |
EffBench.hs:41:26: | |
Could not deduce (Applicative m) arising from a use of ‘pure’ | |
from the context (Functor (VSM s)) | |
bound by the instance declaration at EffBench.hs:37:10-28 | |
or from (Monad m) | |
bound by a type expected by the context: | |
Monad m => m s -> (s -> m ()) -> m b | |
at EffBench.hs:(39,23)-(41,35) | |
Possible fix: | |
add (Applicative m) to the context of | |
a type expected by the context: | |
Monad m => m s -> (s -> m ()) -> m b | |
or the type signature for | |
(<*>) :: VSM s (a -> b) -> VSM s a -> VSM s b | |
or the instance declaration | |
In the expression: pure (f a) | |
In the second argument of ‘(>>=)’, namely ‘\ a -> pure (f a)’ | |
In the expression: ma get put >>= \ a -> pure (f a) | |
EffBench.hs:46:32: | |
Could not deduce (Applicative m) arising from a use of ‘pure’ | |
from the context (Monad m) | |
bound by a type expected by the context: | |
Monad m => m s -> (s -> m ()) -> m a | |
at EffBench.hs:46:14-37 | |
Possible fix: | |
add (Applicative m) to the context of | |
a type expected by the context: | |
Monad m => m s -> (s -> m ()) -> m a | |
or the type signature for return :: a -> VSM s a | |
or the instance declaration | |
In the expression: pure a | |
In the second argument of ‘($)’, namely ‘\ get put -> pure a’ | |
In the expression: VSM $ \ get put -> pure a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment