On Sun, Jun 01, 2008 at 01:13:06AM +0100, Ian Lynagh wrote: > > Hi Serge, > > On Sat, May 31, 2008 at 12:54:50PM +0400, Serge D. Mechveliani wrote: > > This is a bug report for the ghc candidate of May 27, 2008 > > for ghc-6.8.3. > > A short program example for this bug candidate is on > > > > http://botik.ru/pub/local/Mechveliani/ghcBugs/candidateMay27-08-bug.zip > > Thanks, I've finally tracked this down. The problem is that when you > evaluate something like > f ^ 10 > in 6.8.2 the result was > res > while in 6.8.3 it is > 1 * res > > I think this is actually a bug in your class instances, but I will try > to look at http://hackage.haskell.org/trac/ghc/ticket/2306 before 6.8.3 > which should, as a side-effect, make it work again.
?? Probably, 6.8.3 is wrong. Because when res :: Num a => a, 1*res means ((fromInteger 1) :: a) * res in Haskell-98. Right? And (fromInteger n) :: a can be defined arbitrarily by the programmer. For example, DoCon has the instance instance CommutativeRing a => Num (Pol a) where ... fromInteger _ = error "No (fromInteger n) :: Pol _ !\ \Apply instead fromi <samplePolynomial> n." -- something of this kind. This is why res and 1*res are not equivalent in Haskell-98 for res :: Num a => a. Am I missing something? ----------------- Serge Mechveliani [EMAIL PROTECTED] _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users