blob: 9f58a8d786bd5e1484218046ca650a370100b6f3 (
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
T7453.hs:9:15: error: [GHC-25897]
• Couldn't match type ‘t’ with ‘p’
Expected: Id t
Actual: Id p
‘t’ is a rigid type variable bound by
the type signature for:
z :: forall t. Id t
at T7453.hs:8:11-19
‘p’ is a rigid type variable bound by
the inferred type of cast1 :: p -> a
at T7453.hs:(7,1)-(10,30)
• In the expression: aux
In an equation for ‘z’:
z = aux
where
aux = Id v
In an equation for ‘cast1’:
cast1 v
= runId z
where
z :: Id t
z = aux
where
aux = Id v
• Relevant bindings include
aux :: Id p (bound at T7453.hs:10:21)
z :: Id t (bound at T7453.hs:9:11)
v :: p (bound at T7453.hs:7:7)
cast1 :: p -> a (bound at T7453.hs:7:1)
T7453.hs:15:15: error: [GHC-25897]
• Couldn't match type ‘t1’ with ‘p’
Expected: () -> t1
Actual: () -> p
‘t1’ is a rigid type variable bound by
the type signature for:
z :: forall t1. () -> t1
at T7453.hs:14:11-22
‘p’ is a rigid type variable bound by
the inferred type of cast2 :: p -> t
at T7453.hs:(13,1)-(16,33)
• In the expression: aux
In an equation for ‘z’:
z = aux
where
aux = const v
In an equation for ‘cast2’:
cast2 v
= z ()
where
z :: () -> t
z = aux
where
aux = const v
• Relevant bindings include
aux :: forall {b}. b -> p (bound at T7453.hs:16:21)
z :: () -> t1 (bound at T7453.hs:15:11)
v :: p (bound at T7453.hs:13:7)
cast2 :: p -> t (bound at T7453.hs:13:1)
T7453.hs:21:15: error: [GHC-25897]
• Couldn't match expected type ‘t1’ with actual type ‘p’
‘t1’ is a rigid type variable bound by
the type signature for:
z :: forall t1. t1
at T7453.hs:20:11-16
‘p’ is a rigid type variable bound by
the inferred type of cast3 :: p -> t
at T7453.hs:(19,1)-(22,33)
• In the expression: v
In an equation for ‘z’:
z = v
where
aux = const v
In an equation for ‘cast3’:
cast3 v
= z
where
z :: t
z = v
where
aux = const v
• Relevant bindings include
aux :: forall {b}. b -> p (bound at T7453.hs:22:21)
z :: t1 (bound at T7453.hs:21:11)
v :: p (bound at T7453.hs:19:7)
cast3 :: p -> t (bound at T7453.hs:19:1)
|