
18 Feb
2016
18 Feb
'16
5:43 a.m.
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