[Haskell-cafe] Wondering if this could be done.

Sebastian Fischer fischer at nii.ac.jp
Sat Dec 4 12:38:40 CET 2010


On Mon, 2010-11-22 at 14:48 +0800, Magicloud Magiclouds wrote:
> (+) :: A -> A -> A
> (+) a b =
>   A (elem1 a + elem1 b) (elem2 a + elem2 b) -- I got errors here, for
> the (+) is ambiguous. 

That's because (+) is implicitly imported from the Prelude. If you

    import Prelude hiding ((+))

the error disappears.

Sebastian




More information about the Haskell-Cafe mailing list