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

tcfail104.hs:14:12: error:
    • Couldn't match type ‘forall a. a -> a’ with ‘Char -> Char’
      Expected type: (Char -> Char) -> Char -> Char
        Actual type: (forall a. a -> a) -> Char -> Char
    • In the expression: \ (x :: forall a. a -> a) -> x
      In the expression:
        if v then (\ (x :: forall a. a -> a) -> x) else (\ x -> x)
      In the expression:
        (if v then (\ (x :: forall a. a -> a) -> x) else (\ x -> x)) id 'c'

tcfail104.hs:22:15: error:
    • Couldn't match expected type ‘Char -> Char’
                  with actual type ‘forall a. a -> a’
    • When checking that the pattern signature: forall a. a -> a
        fits the type of its context: Char -> Char
      In the pattern: x :: forall a. a -> a
      In the expression: \ (x :: forall a. a -> a) -> x