X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Frename%2FRnEnv.lhs;h=3587093cb982f7a3c54eb16f7467b0e8111e1f73;hp=862e33ff13529eb75840e89299d3d06ba4d169c6;hb=4e0c994eb1613c62e94069642d7acdb2e69b773b;hpb=79723c6692289fd01a2d0548d03a6547eae41ecb diff --git a/compiler/rename/RnEnv.lhs b/compiler/rename/RnEnv.lhs index 862e33f..3587093 100644 --- a/compiler/rename/RnEnv.lhs +++ b/compiler/rename/RnEnv.lhs @@ -730,7 +730,7 @@ lookupTyFixityRn (L _ n) = lookupFixityRn n %* * Rebindable names Dealing with rebindable syntax is driven by the - Opt_NoImplicitPrelude dynamic flag. + Opt_RebindableSyntax dynamic flag. In "deriving" code we don't want to use rebindable syntax so we switch off the flag locally @@ -769,8 +769,8 @@ checks the type of the user thing against the type of the standard thing. lookupSyntaxName :: Name -- The standard name -> RnM (SyntaxExpr Name, FreeVars) -- Possibly a non-standard name lookupSyntaxName std_name - = xoptM Opt_ImplicitPrelude `thenM` \ implicit_prelude -> - if implicit_prelude then normal_case + = xoptM Opt_RebindableSyntax `thenM` \ rebindable_on -> + if not rebindable_on then normal_case else -- Get the similarly named thing from the local environment lookupOccRn (mkRdrUnqual (nameOccName std_name)) `thenM` \ usr_name -> @@ -781,8 +781,8 @@ lookupSyntaxName std_name lookupSyntaxTable :: [Name] -- Standard names -> RnM (SyntaxTable Name, FreeVars) -- See comments with HsExpr.ReboundNames lookupSyntaxTable std_names - = xoptM Opt_ImplicitPrelude `thenM` \ implicit_prelude -> - if implicit_prelude then normal_case + = xoptM Opt_RebindableSyntax `thenM` \ rebindable_on -> + if not rebindable_on then normal_case else -- Get the similarly named thing from the local environment mapM (lookupOccRn . mkRdrUnqual . nameOccName) std_names `thenM` \ usr_names ->