blob: d6a9fec2c5a69e7d0355ab529e7b4f7c91628384 (
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
|
tcfail042.hs:15:10: error:
• Could not deduce ‘Num a’
arising from the superclasses of an instance declaration
from the context: (Eq a, Show a)
bound by the instance declaration at tcfail042.hs:15:10-34
Possible fix:
add (Num a) to the context of the instance declaration
• In the instance declaration for ‘Bar [a]’
tcfail042.hs:17:18: error:
• Could not deduce ‘Num a’ arising from a use of ‘foo’
from the context: (Eq a, Show a)
bound by the instance declaration at tcfail042.hs:15:10-34
Possible fix:
add (Num a) to the context of the instance declaration
• In the expression: foo xs
In an equation for ‘bar’:
bar (x : xs)
= foo xs
where
u = x == x
v = show x
In the instance declaration for ‘Bar [a]’
|