summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T10619.stderr
blob: 481a08a20ca44069fdbaffa365da28b775e1a570 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74

T10619.hs:9:15: error:
    • Couldn't match type ‘p’ with ‘forall b. b -> b’
      Expected: p -> p
        Actual: (forall a. a -> a) -> forall b. b -> b
      ‘p’ is a rigid type variable bound by
        the inferred type of foo :: p1 -> p -> p
        at T10619.hs:(8,1)-(10,20)
    • In the expression:
          (\ x -> x) :: (forall a. a -> a) -> forall b. b -> b
      In the expression:
        if True then
            ((\ x -> x) :: (forall a. a -> a) -> forall b. b -> b)
        else
            \ y -> y
      In an equation for ‘foo’:
          foo _
            = if True then
                  ((\ x -> x) :: (forall a. a -> a) -> forall b. b -> b)
              else
                  \ y -> y
    • Relevant bindings include
        foo :: p1 -> p -> p (bound at T10619.hs:8:1)

T10619.hs:14:15: error:
    • Couldn't match type ‘p’ with ‘forall a. a -> a’
      Expected: p -> p
        Actual: (forall a. a -> a) -> forall b. b -> b
      ‘p’ is a rigid type variable bound by
        the inferred type of bar :: p1 -> p -> p
        at T10619.hs:(12,1)-(14,66)
    • In the expression:
          (\ x -> x) :: (forall a. a -> a) -> forall b. b -> b
      In the expression:
        if True then
            \ y -> y
        else
            ((\ x -> x) :: (forall a. a -> a) -> forall b. b -> b)
      In an equation for ‘bar’:
          bar _
            = if True then
                  \ y -> y
              else
                  ((\ x -> x) :: (forall a. a -> a) -> forall b. b -> b)
    • Relevant bindings include
        bar :: p1 -> p -> p (bound at T10619.hs:12:1)

T10619.hs:16:13: error:
    • Couldn't match type ‘p’ with ‘forall b. b -> b’
      Expected: p -> p
        Actual: (forall a. a -> a) -> forall b. b -> b
      ‘p’ is a rigid type variable bound by
        the inferred type of baz :: Bool -> p -> p
        at T10619.hs:(16,1)-(17,19)
    • In the expression:
          (\ x -> x) :: (forall a. a -> a) -> forall b. b -> b
      In an equation for ‘baz’:
          baz True = (\ x -> x) :: (forall a. a -> a) -> forall b. b -> b
    • Relevant bindings include
        baz :: Bool -> p -> p (bound at T10619.hs:16:1)

T10619.hs:20:14: error:
    • Couldn't match type ‘p’ with ‘forall a. a -> a’
      Expected: p -> p
        Actual: (forall a. a -> a) -> forall b. b -> b
      ‘p’ is a rigid type variable bound by
        the inferred type of quux :: Bool -> p -> p
        at T10619.hs:(19,1)-(20,64)
    • In the expression:
          (\ x -> x) :: (forall a. a -> a) -> forall b. b -> b
      In an equation for ‘quux’:
          quux True = (\ x -> x) :: (forall a. a -> a) -> forall b. b -> b
    • Relevant bindings include
        quux :: Bool -> p -> p (bound at T10619.hs:19:1)