testing 7.01-pre

Serge D. Mechveliani mechvel at botik.ru
Wed Sep 29 12:38:36 EDT 2010


Dear GHC developers,

I have tested                 ghc-7.0.0.20100924  
on  Debian Linux, i386-family
  on making it by  ghc-6.12.3,  on the DoCon test,
-- with skipping profiling.

There are visible the following changes in GHC:


(1) Usage of  ./Main +RTS .. -RTS  needs linking with  -rtsopts


(2) ghc-6.12.2  compiles  docon-2.11  
    (download it via  http://haskell.org/ghc/docon/
     and follow  install.txt
    )
   and  ghc-7.0.0.20100924  cannot. It declares
...   
DPair.hs:316:35:
    Couldn't match type `b' with `a'
      `b' is a rigid type variable bound by
          the instance declaration at DPair.hs:222:38
      `a' is a rigid type variable bound by
          the instance declaration at DPair.hs:222:23
    In the first argument of `restore', namely `zrB'
    In the expression: restore zrB bs qB'
    In an equation for `qB': qB = restore zrB bs qB'


(3) I also tried  docon-2.12  
    (which differs very slightly from docon-2.11 and which I can provide 
     if asked).
ghc-6.12.3  makes it and runs the test successfully.

Compiling it by  ghc-7.0.0.20100924 stops (close to end) at Pol3_.hs
at the fragment of

---------------------------------------------------------------------
instance (LinSolvRing (Pol a), CommutativeRing a) => 
                                           LinSolvRing (UPol (Pol a))
  where
  gxBasis  []       = ([], [])
  gxBasis  fs@(f:_) =
    let
      UPol _ p y dP    = f
      (o, n)           = (pPPO p, genericLength $ pVars p)
      (toLex, fromLex) = (reordPol $ lexPPO n, reordPol o)
      p'               = toLex p
      dP'              = upLinSolvRing p' Map.empty
      s' = cToUPol y dP' p'
  ...
----------------------------------------------------------------

It declares that the line of  `s' ='  needs  (EuclideanRing a)  
and that it cannot deduce it.

I think, for the need of this particular application it is indeed 
better to change the context to  `EuclideanRing a =>'
(probably, the initial complicated context was forced by old GHC).
After changing it to  `EuclideanRing a =>',  ghc-7.0.0.20100924 
makes  docon-2.12  and runs the test successfully.

You see, the points (2) and (3) present a certain question about the 
compler. I wonder wich complier is more correct.
(Recall also that Docon uses an extension with overlapping instances, 
multiparametric classes, and such).


(4) At the docon-2.12 test made under -O,  
    ghc-7.0.0.20100924  shows the time  3.9 sec  instead of  3.3 sec  
    of  ghc-6.12.3.


Regards,

-----------------
Serge Mechveliani
mechvel at botik.ru


More information about the Glasgow-haskell-users mailing list