Fri, 19 May 2000 18:59:03 +0400 (MSD), S.D.Mechveliani <[EMAIL PROTECTED]> pisze:

> I wonder how to make the user prelude  BPrelude  to replace
>                          2 + x  :: T
> 
> with          (Additive.fromInteger 2 :: T) + x
> rather than   (Num.fromInteger      2 :: T) + x
> ?

I see no better way than making Num a superclass of Additive, and
implement only fromInteger in instances of Num for types that don't
already have one (since you would not use or even import other Num
methods).

-- 
 __("<    Marcin Kowalczyk * [EMAIL PROTECTED] http://qrczak.ids.net.pl/
 \__/              GCS/M d- s+:-- a23 C+++$ UL++>++++$ P+++ L++>++++$ E-
  ^^                  W++ N+++ o? K? w(---) O? M- V? PS-- PE++ Y? PGP+ t
QRCZAK                  5? X- R tv-- b+>++ DI D- G+ e>++++ h! r--%>++ y-


Reply via email to