In article <[EMAIL PROTECTED]> [EMAIL PROTECTED] writes:
>
>datatype weekday = mon | tue | wed | thu | fri;
>datatype weekend = sat | sun;
>datatype day = wd of weekday | we of weekend;
>
>Essentially, if you think of your subtypes as "disjoint unions", then
>we've defined day as the union of weekday and weekend, and have named
>the inclusion functions as wd and we.

This would be one method, but as has been pointed out already, the
constructors 'wd' and 'we' are very intrusive. I'd like to remove them
completely.

Rob



-- 
--
Rob Turner, Dept. of Computer Science, University of Hull, UK.
Internet: [EMAIL PROTECTED]   Phone: (0482) 465212

Reply via email to