Christian Maeder maeder at tzi.de
Tue Nov 30 06:48:26 EST 2004

The attached module does not compile and yields the following error:

     Could not deduce (Confuse a) from the context (Typeable a)
       arising from use of `breakFn' at InCoherentInst.hs:17
     Probable fix:
         Add (Confuse a) to the type signature(s) for `addGeneralFallOut'
     In the first argument of `GeneralBreakFn', namely `breakFn'
     In the definition of `addGeneralFallOut':
         addGeneralFallOut = let
                               breakFn a = throwDyn (GeneralFallOutExcep a)
                             in GeneralBreakFn breakFn

The same source compiles ok without -fallow-incoherent-instances (or 
with -fno-allow-incoherent-instances).

If, furthermore, the "confusing instance" is commented out, the source 
even compiles without extensions.

I don't know if this is a bug, possibly related to the import of 
Typeable stuff. I don't need a fix. I only want to point out that 
globally switching on the option -fallow-incoherent-instances is likely 
to break existing code, currently (ghc 6.2.2).

Cheers Christian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: InCoherentInst.hs
Type: text/x-haskell
Size: 592 bytes
Desc: not available
Url : http://www.haskell.org//pipermail/glasgow-haskell-users/attachments/20041130/966adc2a/InCoherentInst.bin

More information about the Glasgow-haskell-users mailing list