Re: Re: Flexible Enumerations

From: Michael Hanus <mh_at_informatik.uni-kiel.de>
Date: Fri, 10 Dec 2004 09:50:37 +0100

Sergio Antoy wrote:
> There is another simple solution.
>
> data Color = Red | Green
> Color = Red ? Green
>
> x=:=Color & (x==Green) =:= False
>
> It is interesting the parallel between the type Color and the
> operation Color and the declaration of x's type, x::Color, and x's
> constraint, x=:=Color.

This looks more nicely than my example.
I am still thinking too "logical" rather than "functional logical"...

Regards,

Michael

_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Fr Dez 10 2004 - 10:05:35 CET

This archive was generated by hypermail 2.3.0 : Do Jun 20 2024 - 07:15:07 CEST