[Haskell-cafe] adding the elements of two lists
Jerzy Karczmarczuk
jerzy.karczmarczuk at unicaen.fr
Sun Mar 25 14:41:52 CEST 2012
TP :
> However, it seems it is not possible to do that:
>
> -------------------
> instance Num [Int] where
> l1 + l2 = ....
> -------------------
>
> Why?
Why not?? It is possible.
All what has been said by other people is right.
But you can do it your way as well, GHC won't protest if you :set
-XFlexibleInstances .
(Then you might have some other "small" problems, but nobody is perfect).
Jerzy Karczmarczuk
More information about the Haskell-Cafe
mailing list