blob: d10c1594ce8d49950ee3a6383b5727255e592525 (
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
|
T11667.hs:12:22: error:
• Could not deduce ‘Num a’ arising from the literal ‘42’
from the context: Eq a
bound by the signature for pattern synonym ‘Pat1’
at T11667.hs:12:1-23
Possible fix:
add (Num a) to the "required" context of
the signature for pattern synonym ‘Pat1’
• In the pattern: 42
In the pattern: Just 42
In the declaration for pattern synonym ‘Pat1’
T11667.hs:18:28: error:
• Couldn't match type ‘b’ with ‘Bool’
arising from the "provided" constraints claimed by
the signature of ‘Pat2’
‘b’ is a rigid type variable bound by
the signature for pattern synonym ‘Pat2’
at T11667.hs:17:17-50
• In the declaration for pattern synonym ‘Pat2’
• Relevant bindings include y :: b (bound at T11667.hs:18:21)
T11667.hs:24:24: error:
• No instance for ‘Show a’
arising from the "provided" constraints claimed by
the signature of ‘Pat3’
In other words, a successful match on the pattern
Just x
does not provide the constraint (Show a)
• In the declaration for pattern synonym ‘Pat3’
T11667.hs:31:16: error:
• Could not deduce ‘Num a’ arising from a use of ‘MkS’
from the context: (Eq a, Show a)
bound by the signature for pattern synonym ‘Pat4’
at T11667.hs:31:1-21
Possible fix:
add (Num a) to the "required" context of
the signature for pattern synonym ‘Pat4’
• In the expression: MkS 42
In an equation for ‘Pat4’: Pat4 = MkS 42
|