-Everyone raise their hand who thinks that `d :: [Int]' should give a different
-answer from `d' :: [Int]'. Well, in ghc-4.04, it does. The `optimization'
-only applies to instance decls, not to regular bindings, giving inconsistent
-behavior.
-
-Old hugs had this same bug. Here's how we fixed it: like GHC, the list of
-instances for a given class is ordered, so that more specific instances come
-before more generic ones. For example, the instance list for C might contain:
- ..., C Int, ..., C a, ...
-When we go to look for a `C Int' instance we'll get that one first. But what
-if we go looking for a `C b' (`b' is unconstrained)? We'll pass the `C Int'
-instance, and keep going. But if `b' is unconstrained, then we don't know yet
-if the more specific instance will eventually apply. GHC keeps going, and
-matches on the generic `C a'. The fix is to, at each step, check to see if
-there's a reverse match, and if so, abort the search. This prevents hugs
-from prematurely chosing a generic instance when a more specific one exists.
+Everyone raise their hand who thinks that `d :: [Int]' should give a
+different answer from `d' :: [Int]'. Well, in ghc-4.04, it does. The
+`optimization' only applies to instance decls, not to regular
+bindings, giving inconsistent behavior.
+
+Old hugs had this same bug. Here's how we fixed it: like GHC, the
+list of instances for a given class is ordered, so that more specific
+instances come before more generic ones. For example, the instance
+list for C might contain:
+ ..., C Int, ..., C a, ...
+When we go to look for a `C Int' instance we'll get that one first.
+But what if we go looking for a `C b' (`b' is unconstrained)? We'll
+pass the `C Int' instance, and keep going. But if `b' is
+unconstrained, then we don't know yet if the more specific instance
+will eventually apply. GHC keeps going, and matches on the generic `C
+a'. The fix is to, at each step, check to see if there's a reverse
+match, and if so, abort the search. This prevents hugs from
+prematurely chosing a generic instance when a more specific one
+exists.