From 73b92b542bb06d33cffd0f548603dd0a4872294a Mon Sep 17 00:00:00 2001 From: simonpj Date: Mon, 30 Apr 2001 10:49:38 +0000 Subject: [PATCH] [project @ 2001-04-30 10:49:38 by simonpj] Add comments --- ghc/compiler/typecheck/TcSimplify.lhs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ghc/compiler/typecheck/TcSimplify.lhs b/ghc/compiler/typecheck/TcSimplify.lhs index a4f6af4..d8c3194 100644 --- a/ghc/compiler/typecheck/TcSimplify.lhs +++ b/ghc/compiler/typecheck/TcSimplify.lhs @@ -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. -- 1.7.10.4