diff options
Diffstat (limited to 'compiler/GHC/Rename/Expr.hs')
-rw-r--r-- | compiler/GHC/Rename/Expr.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/GHC/Rename/Expr.hs b/compiler/GHC/Rename/Expr.hs index a85103d8ed..d6805c2b05 100644 --- a/compiler/GHC/Rename/Expr.hs +++ b/compiler/GHC/Rename/Expr.hs @@ -294,7 +294,10 @@ rnExpr (OpApp _ e1 op e2) _ -> return (Fixity NoSourceText minPrecedence InfixL) -- c.f. lookupFixity for unbound - ; final_e <- mkOpAppRn e1' op' fixity e2' + ; lexical_negation <- xoptM LangExt.LexicalNegation + ; let negation_handling | lexical_negation = KeepNegationIntact + | otherwise = ReassociateNegation + ; final_e <- mkOpAppRn negation_handling e1' op' fixity e2' ; return (final_e, fv_e1 `plusFV` fv_op `plusFV` fv_e2) } rnExpr (NegApp _ e _) |