[project @ 2001-04-30 10:49:38 by simonpj]
authorsimonpj <unknown>
Mon, 30 Apr 2001 10:49:38 +0000 (10:49 +0000)
committersimonpj <unknown>
Mon, 30 Apr 2001 10:49:38 +0000 (10:49 +0000)
Add comments

ghc/compiler/typecheck/TcSimplify.lhs

index a4f6af4..d8c3194 100644 (file)
@@ -324,6 +324,15 @@ URK!  Let's not do this. So this is illegal:
        f :: Int -> Int
        f x = x + ?y
 
+There's a nasty corner case when the monomorphism restriction bites:
+
+       f = x + ?y
+
+The argument above suggests that we must generalise over the ?y parameter, 
+but the monomorphism restriction says that we can't.  The current 
+implementation chooses to let the monomorphism restriction 'win' in this
+case, but it's not clear what the Right Thing is.
+
 BOTTOM LINE: you *must* quantify over implicit parameters.