Brandon S. Allbery KF8NH wrote:


On Aug 21, 2007, at 22:13 , Twan van Laarhoven wrote:

Other rules that could be interesting are:
> forall a b. fromInteger a + fromInteger b = fromInteger (a + b)


I don't think this will work, a and b have to be the same type.

They are of the same type, both are Integers,

> forall a b :: Integer.
>     ((fromInteger (a::Integer)) + (fromInteger b)) :: Num n => n
>   =
>     (fromInteger (a + b :: Integer)) :: Num n => n

Twan
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to