On Thu, May 31, 2007 at 09:04:30PM +0200, Tomasz Zielonka wrote:
> On Thu, May 31, 2007 at 06:16:20PM +0100, Jon Harrop wrote:
> > > I can't think of a lightweight way to encode overlapping enumerations in
> > > Haskell. 
> > 
> > I'd like to know if this is possible in Haskell.
> 
> Maybe this way using GADTs and typeclasses? I haven't used such code in
> practice - there may be some hidden traps.

Let me be the first one to admit that this approach is highly unmodular
- you have to define all cases in one place, or at least each group of
overlapping enum types.

Best regards
Tomek
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to