summaryrefslogtreecommitdiff
path: root/testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr
blob: 1a11c1f996dec4ca4c5163912f610fdb310f9a05 (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

PushedInAsGivens.hs:10:31: error:
    • Couldn't match expected type ‘a’ with actual type ‘a0’
        because type variable ‘a’ would escape its scope
      This (rigid, skolem) type variable is bound by
        the type signature for:
          foo :: forall a. (F Int ~ [a]) => a -> Int
        at PushedInAsGivens.hs:9:13-44
    • In the expression: y
      In the first argument of ‘length’, namely ‘[x, y]’
      In the expression: length [x, y]
    • Relevant bindings include
        x :: a (bound at PushedInAsGivens.hs:10:17)
        foo :: a -> Int (bound at PushedInAsGivens.hs:10:13)
        y :: a0 (bound at PushedInAsGivens.hs:9:5)
        bar :: a0 -> (a0, Int) (bound at PushedInAsGivens.hs:9:1)

PushedInAsGivens.hs:11:15: error:
    • Couldn't match type: F Int
                     with: [a0]
        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 :: a0 (bound at PushedInAsGivens.hs:9:5)
        bar :: a0 -> (a0, Int) (bound at PushedInAsGivens.hs:9:1)