[Haskell-cafe] Undecidable instances with functional dependencies

Henning Thielemann lemming at henning-thielemann.de
Thu Feb 11 16:32:14 EST 2010

I have the following class and instance

   class Register a r | a -> r where

   instance (Register a ra, Register b rb) =>
      Register (a,b) (ra,rb) where

and GHC refuses the instance because of violated Coverage Condition.
I have more instances like

   instance Register Int8  (Reg Int8)  where
   instance Register Word8 (Reg Word8) where

and for the set of instances I plan, the instance resolution will always 
terminate. I remember that the term 'undecidable instance' is not fixed 
and may be relaxed if a more liberal condition can be found. Is there a 
place, say a Wiki page, where we can collect examples where we think that 
the current check of GHC is too restrictive?

More information about the Haskell-Cafe mailing list