[1 of 1] Compiling Main ( prog.hs, prog.o )
prog.hs:33:1:
Could not deduce (Times a1 b0 c1)
arising from the ambiguity check for `test'
from the context (Num a,
Num a2,
Num b,
Times (b1 -> c) b c2,
Times a (b1 -> c3) (b1 -> c),
Times a2 b1 c3)
bound by the inferred type for `test':
(Num a, Num a2, Num b, Times (b1 -> c) b c2,
Times a (b1 -> c3) (b1 -> c), Times a2 b1 c3) =>
c2
at prog.hs:33:1-24
The type variables `a1', `b0', `c1' are ambiguous
Possible fix: add a type signature that fixes these type variable(s)
Note: there are several potential instances:
instance [overlap ok] Times (a -> b) a b
-- Defined at prog.hs:28:10
instance [overlap ok] Times a b c => Times a (r -> b) (r -> c)
-- Defined at prog.hs:25:10
instance [overlap ok] Times (b -> c) (a -> b) (a -> c)
-- Defined at prog.hs:22:10
...plus three others
When checking that `test'
has the inferred type `forall c b c1 a a1 b1 c2.
(Num a, Num a1, Num b, Times (b1 -> c) b c1,
Times a (b1 -> c2) (b1 -> c), Times a1 b1 c2) =>
c1'
Probable cause: the inferred type is ambiguous