summaryrefslogtreecommitdiff
path: root/testsuite/tests/indexed-types/should_fail/GADTwrong1.stderr
blob: f8689f9b8dc4cd0d2f6adff4587e18bb2c98f28d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

GADTwrong1.hs:12:21: error:
    • Couldn't match expected type ‘b’ with actual type ‘c’
      ‘c’ is a rigid type variable bound by
        a pattern with constructor: T :: forall c. c -> T (Const c),
        in a case alternative
        at GADTwrong1.hs:12:14-16
      ‘b’ is a rigid type variable bound by
        the type signature for:
          coerce :: forall a b. a -> b
        at GADTwrong1.hs:10:1-29
    • In the expression: y
      In a case alternative: T y -> y
      In the expression: case T x :: T (Const b) of { T y -> y }
    • Relevant bindings include
        y :: c (bound at GADTwrong1.hs:12:16)
        coerce :: a -> b (bound at GADTwrong1.hs:11:1)