summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T9612.stderr
blob: 823fee112c06a2bb5e11b3317558d5e9299d9056 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

T9612.hs:16:9:
    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
    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)
    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) }