
16 Oct
2010
16 Oct
'10
10:52 a.m.
On Sat, Oct 16, 2010 at 7:11 AM, Max Bolingbroke
Hi GHC users,
Now that the Glorious New type checker can handle local evidence seamlessly, is it a big implementation burden to extend it to deal with local *type class instances* in addition to local *equality constraints*?
For example, you could write this:
""" f :: Bool f = id < id where instance Ord (a -> b) where _ `compare` _ = LT """
Along similar lines as my last post, would I be able to write the following type signature: myFunct :: Ord Int => Int -> (...) and have it always use the local instance for Ord Int? Is this the type that the type checker would infer for my function? Antoine