summaryrefslogtreecommitdiff
path: root/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr
blob: 5ba9df0d1ad2d707e29dbfe6842990b79f66ee70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

PushedInAsGivens.hs:10:31: error:
    • Could not deduce: a1 ~ a
      from the context: F Int ~ [a1]
        bound by the type signature for:
                   foo :: forall a1. (F Int ~ [a1]) => a1 -> Int
        at PushedInAsGivens.hs:9:13-44
      ‘a1’ is a rigid type variable bound by
        the type signature for:
          foo :: forall a1. (F Int ~ [a1]) => a1 -> Int
        at PushedInAsGivens.hs:9:13-44
      ‘a’ is a rigid type variable bound by
        the inferred type of bar :: a -> (a, Int)
        at PushedInAsGivens.hs:(9,1)-(11,20)
    • In the expression: y
      In the first argument of ‘length’, namely ‘[x, y]’
      In the expression: length [x, y]
    • Relevant bindings include
        x :: a1 (bound at PushedInAsGivens.hs:10:17)
        foo :: a1 -> Int (bound at PushedInAsGivens.hs:10:13)
        y :: a (bound at PushedInAsGivens.hs:9:5)
        bar :: a -> (a, Int) (bound at PushedInAsGivens.hs:9:1)

PushedInAsGivens.hs:11:15: error:
    • Couldn't match type: F Int
                     with: [a]
        arising from a use of ‘foo’
    • In the expression: foo y
      In the expression: (y, foo y)
      In the expression:
        let
          foo :: (F Int ~ [a]) => a -> Int
          foo x = length [...]
        in (y, foo y)
    • Relevant bindings include
        y :: a (bound at PushedInAsGivens.hs:9:5)
        bar :: a -> (a, Int) (bound at PushedInAsGivens.hs:9:1)