Question about sets

Jon Cast jcast@ou.edu
Tue, 20 Aug 2002 14:19:53 -0500


"Scott J." <jscott@planetinternet.be> wrote:

> As far a I know sets can implemented by implementing a list of
> anything(a list of all types) The sets Haskell does have are AFAIK
> sets of elements of the same type: these are not general sets.

Ah.  That's a static typing issue.

However, I don't think it's really an issue.  In axiomatic set theory,
every set must be a subset of some other set, except for powersets and
unions.  Unions are implementable using Either, and powersets are
implementable using Set (i.e., powerset :: Set a -> Set (Set a)).

> Scott

Jon Cast