blob: 17ffbc1595b37c46b27496109b92df2b737ab5a9 (
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
|
NamedWildcardExplicitForall.hs:8:7: error:
• Couldn't match type ‘_a’ with ‘Bool’
Expected: _a -> _a
Actual: Bool -> Bool
‘_a’ is a rigid type variable bound by
the type signature for:
foo :: forall _a. _a -> _a
at NamedWildcardExplicitForall.hs:7:1-27
• In the expression: not
In an equation for ‘foo’: foo = not
• Relevant bindings include
foo :: _a -> _a (bound at NamedWildcardExplicitForall.hs:8:1)
NamedWildcardExplicitForall.hs:10:8: error:
• Found type wildcard ‘_a’ standing for ‘Bool’
To use the inferred type, enable PartialTypeSignatures
• In the type signature: bar :: _a -> _a
NamedWildcardExplicitForall.hs:13:26: error:
• Found type wildcard ‘_b’ standing for ‘Bool’
To use the inferred type, enable PartialTypeSignatures
• In the type signature: baz :: forall _a. _a -> _b -> (_a, _b)
NamedWildcardExplicitForall.hs:14:12: error:
• Couldn't match expected type ‘_a’ with actual type ‘Bool’
‘_a’ is a rigid type variable bound by
the inferred type of baz :: _a -> Bool -> (_a, Bool)
at NamedWildcardExplicitForall.hs:13:15-16
• In the expression: not x
In the expression: (not x, not y)
In an equation for ‘baz’: baz x y = (not x, not y)
• Relevant bindings include
x :: _a (bound at NamedWildcardExplicitForall.hs:14:5)
baz :: _a -> Bool -> (_a, Bool)
(bound at NamedWildcardExplicitForall.hs:14:1)
NamedWildcardExplicitForall.hs:16:8: error:
• Found type wildcard ‘_a’ standing for ‘Bool’
To use the inferred type, enable PartialTypeSignatures
• In the type signature: qux :: _a -> (forall _a. _a -> _a) -> _a
|