[Haskell-cafe] Re: generalised algebraic data types, existential types, and phantom types

2004-07-22 Thread Jim Apple
I tried to post this to gmane.comp.lang.haskell.general, but it never got there - it may belong here anyway. Abraham Egnor wrote: > Is there any closer approximation [of GADTs] possible? {-# OPTIONS -fglasgow-exts #-} {-# OPTIONS -fallow-undecidable-instances #-} data Term a = forall b . (EqType

Re: [Haskell-cafe] Data.Set subset function?

2004-07-22 Thread Christian Maeder
Graham Klyne wrote: I don't see a subset function in Data.Set. What is the preferred way to define this? I currently have: a `subset` b = isEmptySet (a `minusSet` b) Maybe add a speedup: size a <= size b && isEmptySet (a `minusSet` b) (Computing the size should be cheap) (Hmmm... does library