[Haskell-cafe] GHC optimisations
Twan van Laarhoven
twanvl at gmail.com
Tue Aug 21 22:21:26 EDT 2007
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
More information about the Haskell-Cafe