That is more consistent, but it leaves no room to intersperse auxiliary definitions, which strikes me as unfortunate for practical reasons.
Hi.
For consistency reasons, I'd love to write the following, possibly even
omiting the closed keyword.
> {-# LANGUAGE ClosedClasses #-}
> closed class Closed a b where
> fun :: a -> b -> Int
> instance Closed Int y where fun x _ = x
> instance Closed x Int where fun _ y = y
> instance Closed x y where fun _ _ = 0
I guess, that's already bikeshedding.
Cheers,
Tobias Florek
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe