Dear GHC developers,

the following looks like a bug in  ghc-4.04-pre-late-June-99.
ghc -c ...  for the below module yields

  No instance for `Ring0_.FactorizationRing (ResEuc0_.ResidueE Z)'
      arising from use of `eucNorm' at Main.hs:6

Un-commenting the line  iI = ...    returns it to right compilation.
Though, this iI value is not used in the program.
--------------------------------------
import Prelude_   (Z                )
import Ring0_     (EuclideanRing(..))
import Ring_      (pirChinIdeal_ft  )
import T_pfactor  (t_pfactor1_      )

main = let  t1 = t_pfactor1_ 5
            -- iI = pirChinIdeal_ft "bef" (5::Z) [] [] []
       in
       putStr$ shows (eucNorm t1) "\n"
--------------------------------------
The effect may relate to re-exporting and to overlapping instances. 
In particular, there are overlaps for  ..=> ResidueE a, ResidueE Z.
The keys are
  -fglasgow-exts  -optC-fallow-overlapping-instances 
  -optC-fallow-undecidable-instances  -fvia-C  -syslib misc 
  -recomp -hi-diffs -fno-warn-overlapping-patterns 
  -fwarn-unused-binds -fwarn-unused-matches 
  -optCrts-G3 -optCrts-F1.5 -optCrts-M25m

The example consists of many modules. Though it was reduced many times
from initial one. Most probably, it can be reduced further.
It looks like the implementation for most of the functions can be set
dummy.

"Making":   uudecode,  unzip bug.zip,  make all.

If you are ready to deal with this bug, tell me please, whom i have to
send the archive to (.zip file of about 80K byte).


------------------
Sergey Mechveliani
[EMAIL PROTECTED]






Reply via email to