Bug in GHC when compiling with -O ?

Hello, we are working on a very large project called Hets (heterogenous tool set) where we encounterd two related errors in ghc, which disappear when we start over the compilation at that point where the compilation stopped due to one of that errors. We certainly use the current version 6.2.1 of GHC. We use in conjunction these command line switches for the compilation: --make -fglasgow-exts -fallow-overlapping-instances -fallow-undecidable-instances -O where actually only some imported packages really need these switches: -fallow-overlapping-instances -fallow-undecidable-instances The tar-ball with the error enabled in the toplevel Makefile is available here: http://www.informatik.uni-bremen.de/agbkb/forschung/formal_methods/CoFI/hets... (4.2M) The errors also disappear when we compile the problematic modules separately. Cheers, Klaus The error messages we get when compiling: Compiling Common.Lib.Rel ( ./Common/Lib/Rel.hs, ./Common/Lib/Rel.o ) ./Common/Lib/Rel.hs:102: Could not unambiguously deduce (Show (a, a)) from the context (Show (Rel a), Show a, Ord a) arising from use of `show' at ./Common/Lib/Rel.hs:102 The choice of (overlapping) instance declaration depends on the instantiation of `a' Probable fix: Add (Show (a, a)) to the class or instance method `show' Or add an instance declaration for (Show (a, a)) In the first argument of `(.)', namely `show' In the definition of `show': show = show . (Common.Lib.Set.fromList . toList) In the definition for method `show' Compiling Common.PPUtils ( ./Common/PPUtils.hs, ./Common/PPUtils.o ) ./Common/PPUtils.hs:176: Could not unambiguously deduce (Show (a, b)) from the context (PrettyPrint a, PrettyPrint b) arising from the instance declaration at ./Common/PPUtils.hs:176 The choice of (overlapping) instance declaration depends on the instantiation of `a, b' Probable fix: Add (Show (a, b)) to the instance declaration superclass context Or add an instance declaration for (Show (a, b)) In the instance declaration for `PrettyPrint (a, b)' -- Klaus Lüttich Email: luettich@tzi.de FB 3 Phone: +49-421-218-7129 Uni Bremen
participants (1)
-
Klaus Lüttich