[Haskell-cafe] fundeps and overlapping/undecidable instances

2007-12-07 Thread Jim Burton
I have some type-level sets using fundeps working whereby equality and membership etc are predicate functions. This seems to leads to an explosion of ugly code, with `If' class constraints etc getting out of hand -- I want to treat these as relations instead so providing the definition describes

Re: [Haskell-cafe] fundeps and overlapping/undecidable instances

2007-12-07 Thread Jeff Polakow
Hello, You should be able to use fundeps to do exactly what you describe below. Can you make a relatively small self-contained example which exemplifies the ugliness you see? -Jeff [EMAIL PROTECTED] wrote on 12/07/2007 11:24:35 AM: I have some type-level sets using fundeps working

Re: [Haskell-cafe] fundeps and overlapping/undecidable instances

2007-12-07 Thread jim burton
On Fri, 2007-12-07 at 12:49 -0500, Jeff Polakow wrote: Hello, You should be able to use fundeps to do exactly what you describe below. Can you make a relatively small self-contained example which exemplifies the ugliness you see? Hi Jeff, as well as a minor code explosion if

Re: [Haskell-cafe] fundeps and overlapping/undecidable instances

2007-12-07 Thread Jeff Polakow
Hello, Does the following code work for you? -Jeff --- {-# OPTIONS_GHC -fglasgow-exts -fallow-undecidable-instances -fallow-overlapping-instances #-} data Nil = Nil data x ::: xs = x ::: xs infixr 5 ::: data HTrue = HTrue deriving Show data HFalse = HFalse deriving