[Haskell-cafe] Data constructors

Mark Carroll mark at chaos.x-philes.com
Sun Apr 25 21:47:34 EDT 2004

On Sun, 25 Apr 2004, Scott Turner wrote:
> Must function concepts such as 'union' can be made into type classes, to the
> extent that the concept can be described in the type system.

Unfortunately, you still need the different names when you make the
instances, and you can't do things like foo { bar = baz } with the "bar"
as the name of the function in the class instead of the field name /
selector function that's used in the instance, AFAIK.

(Thanks for your other comments.)

-- Mark

More information about the Haskell-Cafe mailing list