On Fri, 21 Feb 2003 08:05:37 +0100 Nick Name <[EMAIL PROTECTED]> wrote:
> -- Does not type if overlapping instances are allowed > -- > --instance Functor SList where > -- fmap f End = End > -- fmap f (a:::as) = (call f a):::(fmap f as) I skipped the declaration of SList, which is the coolest part of the story to my eyes: data SList a = forall b . (Subtype b a) => (:::) b (SList a) | End This is a list holding values of subtypes of a. Vincenzo _______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
