diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-01-23 13:17:50 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-01-31 02:46:54 -0500 |
commit | 942c714830c73ac40e1c02bff37e2850c6794081 (patch) | |
tree | 3678bb373b27fd15eaa128dff5b06688157acd4b /compiler | |
parent | 29c701c154cafa4844cf3c1bd4a93cacfa6b1ee1 (diff) | |
download | haskell-942c714830c73ac40e1c02bff37e2850c6794081.tar.gz |
rename: Eliminate usage of mkVarOccUnique
Replacing it with `newSysName`. Fixes #17061.
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/GHC/Rename/Expr.hs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/compiler/GHC/Rename/Expr.hs b/compiler/GHC/Rename/Expr.hs index a084bff71e..a03288086e 100644 --- a/compiler/GHC/Rename/Expr.hs +++ b/compiler/GHC/Rename/Expr.hs @@ -67,8 +67,6 @@ import Data.Ord import Data.Array import qualified Data.List.NonEmpty as NE -import Unique ( mkVarOccUnique ) - {- ************************************************************************ * * @@ -2198,10 +2196,10 @@ getMonadFailOp | rebindableSyntax && overloadedStrings = do (failExpr, failFvs) <- lookupSyntaxName failMName (fromStringExpr, fromStringFvs) <- lookupSyntaxName fromStringName - let arg_lit = fsLit "arg" - arg_name = mkSystemVarName (mkVarOccUnique arg_lit) arg_lit - arg_syn_expr = mkRnSyntaxExpr arg_name - let body :: LHsExpr GhcRn = + let arg_lit = mkVarOcc "arg" + arg_name <- newSysName arg_lit + let arg_syn_expr = mkRnSyntaxExpr arg_name + body :: LHsExpr GhcRn = nlHsApp (noLoc $ syn_expr failExpr) (nlHsApp (noLoc $ syn_expr fromStringExpr) (noLoc $ syn_expr arg_syn_expr)) |