From: simonpj Date: Thu, 3 May 2001 08:09:52 +0000 (+0000) Subject: [project @ 2001-05-03 08:09:52 by simonpj] X-Git-Tag: Approximately_9120_patches~2029 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=4297c94eed6d8610549b6d4375e88ed942dc3234;p=ghc-hetmet.git [project @ 2001-05-03 08:09:52 by simonpj] More to allow infix exprssions on LHS of rule --- diff --git a/ghc/compiler/rename/RnSource.lhs b/ghc/compiler/rename/RnSource.lhs index 50a9dcd..0023a13 100644 --- a/ghc/compiler/rename/RnSource.lhs +++ b/ghc/compiler/rename/RnSource.lhs @@ -838,6 +838,7 @@ not one of the @forall@'d variables. validRuleLhs foralls lhs = check lhs where + check (OpApp _ op _ _) = check op check (HsApp e1 e2) = check e1 check (HsVar v) | v `notElem` foralls = True check other = False @@ -882,7 +883,7 @@ badRuleLhsErr name lhs ptext SLIT("LHS must be of form (f e1 .. en) where f is not forall'd") badRuleVar name var - = sep [ptext SLIT("Rule") <+> ptext name <> colon, + = sep [ptext SLIT("Rule") <+> doubleQuotes (ptext name) <> colon, ptext SLIT("Forall'd variable") <+> quotes (ppr var) <+> ptext SLIT("does not appear on left hand side")]