blob: 26cea79487243b8bdcd7045b6ff4131b12b6bd84 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
T9612.hs:16:9: error:
• Couldn't match type: [(Int, a)]
with: (Int, a)
arising from a functional dependency between:
constraint ‘MonadWriter (Int, a) (WriterT [(Int, a)] Identity)’
arising from a use of ‘tell’
instance ‘MonadWriter w (WriterT w m)’ at T9612.hs:20:10-59
• In a stmt of a 'do' block: tell (n, x)
In the expression:
do tell (n, x)
return (1, y)
In an equation for ‘f’:
f y (n, x)
= do tell (n, x)
return (1, y)
• Relevant bindings include
x :: a (bound at T9612.hs:14:8)
y :: a (bound at T9612.hs:14:3)
f :: a -> (Int, a) -> Writer [(Int, a)] (Int, a)
(bound at T9612.hs:14:1)
|