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