blob: d84c3b90e3e3ac27c90b12ebd0735e09fc710d28 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
tcfail008.hs:3:5: error:
Ambiguous type variable ‘a0’ arising from the literal ‘1’
prevents the constraint ‘(Num a0)’ from being solved.
Relevant bindings include o :: [a0] (bound at tcfail008.hs:3:1)
Probable fix: use a type annotation to specify what ‘a0’ should be.
These potential instances exist:
instance Num Integer -- Defined in ‘GHC.Num’
instance Num Double -- Defined in ‘GHC.Float’
instance Num Float -- Defined in ‘GHC.Float’
...plus two others
(use -fprint-potential-instances to see them all)
In the first argument of ‘(:)’, namely ‘1’
In the expression: 1 : 2
In an equation for ‘o’: o = 1 : 2
tcfail008.hs:3:7: error:
No instance for (Num [a0]) arising from the literal ‘2’
In the second argument of ‘(:)’, namely ‘2’
In the expression: 1 : 2
In an equation for ‘o’: o = 1 : 2
|