blob: 6cb1f442a7235703dd7b7f0eda82a8ce7f09abdf (
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
VtaFail.hs:7:16: error:
• Cannot apply expression of type ‘a0 -> b0 -> (a0, b0)’
to a visible type argument ‘Int’
• In the expression: pairup_nosig @Int @Bool 5 True
In an equation for ‘answer_nosig’:
answer_nosig = pairup_nosig @Int @Bool 5 True
VtaFail.hs:14:17: error:
• Cannot apply expression of type ‘p0 -> p0’
to a visible type argument ‘Int’
• In the expression: (\ x -> x) @Int 12
In an equation for ‘answer_lambda’:
answer_lambda = (\ x -> x) @Int 12
VtaFail.hs:19:5: error:
• Cannot apply expression of type ‘Int -> (a0, Int)’
to a visible type argument ‘Bool’
• In the expression: pair 3 @Int @Bool True
In an equation for ‘a’: a = pair 3 @Int @Bool True
VtaFail.hs:26:15: error:
• Expected kind ‘* -> *’, but ‘Int’ has kind ‘*’
• In the type ‘Int’
In the expression: first @Int F
In an equation for ‘fInt’: fInt = first @Int F
VtaFail.hs:26:19: error:
• Couldn't match kind ‘*’ with ‘* -> *’
When matching types
a1 :: * -> *
Int :: *
Expected type: First Int
Actual type: First a1
• In the second argument of ‘first’, namely ‘F’
In the expression: first @Int F
In an equation for ‘fInt’: fInt = first @Int F
VtaFail.hs:33:18: error:
• Couldn't match type ‘Int’ with ‘Bool’
Expected type: Proxy Bool
Actual type: Proxy Int
• In the second argument of ‘foo’, namely ‘(P :: Proxy Int)’
In the expression: foo @Bool (P :: Proxy Int)
In an equation for ‘baz’: baz = foo @Bool (P :: Proxy Int)
VtaFail.hs:40:17: error:
• Expected kind ‘* -> k0 -> *’, but ‘Maybe’ has kind ‘* -> *’
• In the type ‘Maybe’
In the expression: too @Maybe T
In an equation for ‘threeBad’: threeBad = too @Maybe T
VtaFail.hs:40:23: error:
• Couldn't match kind ‘*’ with ‘k0 -> *’
When matching types
a0 :: * -> k0 -> *
Maybe :: * -> *
Expected type: Three Maybe
Actual type: Three a0
• In the second argument of ‘too’, namely ‘T’
In the expression: too @Maybe T
In an equation for ‘threeBad’: threeBad = too @Maybe T
VtaFail.hs:41:27: error:
• Couldn't match type ‘Either’ with ‘(->)’
Expected type: Three (->)
Actual type: Three Either
• In the second argument of ‘too’, namely ‘(T :: Three Either)’
In the expression: too @(->) (T :: Three Either)
In an equation for ‘threeWorse’:
threeWorse = too @(->) (T :: Three Either)
VtaFail.hs:46:5: error:
• Cannot apply expression of type ‘Int -> Int -> Int’
to a visible type argument ‘Int’
• In the expression: plus @Int 5 7
In an equation for ‘b’: b = plus @Int 5 7
VtaFail.hs:47:5: error:
• Cannot apply expression of type ‘Int -> Int -> Int’
to a visible type argument ‘Rational’
• In the expression: plus @Rational 5 10
In an equation for ‘c’: c = plus @Rational 5 10
VtaFail.hs:48:5: error:
• Cannot apply expression of type ‘Int -> Int -> Int’
to a visible type argument ‘Int’
• In the expression: (+) @Int @Int @Int 12 14
In an equation for ‘d’: d = (+) @Int @Int @Int 12 14
VtaFail.hs:51:5: error:
• Cannot apply expression of type ‘Int -> String’
to a visible type argument ‘Float’
• In the expression: show @Int @Float (read "5")
In an equation for ‘e’: e = show @Int @Float (read "5")
VtaFail.hs:52:11: error:
• Cannot apply expression of type ‘String -> Int’
to a visible type argument ‘Bool’
• In the first argument of ‘show’, namely
‘(read @Int @Bool @Float "3")’
In the expression: show (read @Int @Bool @Float "3")
In an equation for ‘f’: f = show (read @Int @Bool @Float "3")
VtaFail.hs:57:12: error:
• Expecting one more argument to ‘Maybe’
Expected a type, but ‘Maybe’ has kind ‘* -> *’
• In the type ‘Maybe’
In the expression: silly @Maybe
In an equation for ‘g’: g = silly @Maybe
|