blob: 4bfc79eca4fe917eaa47ba1aab2522b2c38a16c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
ado005.hs:8:3: error:
Could not deduce (Monad f) arising from a do statement
from the context: Applicative f
bound by the type signature for:
test :: Applicative f => (Int -> f Int) -> f Int
at ado005.hs:6:1-48
Possible fix:
add (Monad f) to the context of
the type signature for:
test :: Applicative f => (Int -> f Int) -> f Int
In a stmt of a 'do' block: x <- f 3
In the expression:
do { x <- f 3;
y <- f x;
return (x + y) }
In an equation for ‘test’:
test f
= do { x <- f 3;
y <- f x;
return (x + y) }
|