diff options
author | Curran McConnell <curran@atidot.com> | 2022-08-16 15:27:27 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-10-12 16:32:26 -0400 |
commit | 819150893a9af7ee0770aba64b140bf1bc54957b (patch) | |
tree | ad91aa840a7590ae90001b2efff4e69fd24d7532 | |
parent | 481467a5ceb07bb28bb6edb1569c86ff3cac315f (diff) | |
download | haskell-819150893a9af7ee0770aba64b140bf1bc54957b.tar.gz |
remove name shadowing
-rw-r--r-- | ghc/GHCi/UI/Monad.hs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/ghc/GHCi/UI/Monad.hs b/ghc/GHCi/UI/Monad.hs index 01f8f65831..aae605efa8 100644 --- a/ghc/GHCi/UI/Monad.hs +++ b/ghc/GHCi/UI/Monad.hs @@ -1,6 +1,5 @@ {-# LANGUAGE FlexibleInstances, DeriveFunctor, DerivingVia #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -{-# OPTIONS -fno-warn-name-shadowing #-} ----------------------------------------------------------------------------- -- @@ -474,10 +473,10 @@ printStats dflags ActionStats{actionAllocs = mallocs, actionElapsedTime = secs} Just allocs -> text (separateThousands allocs) <+> text "bytes"))) where - separateThousands n = reverse . sep . reverse . show $ n - where sep n' + separateThousands n = reverse . separate . reverse . show $ n + where separate n' | n' `lengthAtMost` 3 = n' - | otherwise = take 3 n' ++ "," ++ sep (drop 3 n') + | otherwise = take 3 n' ++ "," ++ separate (drop 3 n') ----------------------------------------------------------------------------- -- reverting CAFs @@ -526,13 +525,13 @@ turnOffBuffering_ fhv = do liftIO $ evalIO interp fhv mkEvalWrapper :: GhcMonad m => String -> [String] -> m ForeignHValue -mkEvalWrapper progname args = +mkEvalWrapper progname' args' = runInternal $ GHC.compileParsedExprRemote - $ evalWrapper `GHC.mkHsApp` nlHsString progname - `GHC.mkHsApp` nlList (map nlHsString args) + $ evalWrapper' `GHC.mkHsApp` nlHsString progname' + `GHC.mkHsApp` nlList (map nlHsString args') where nlHsString = nlHsLit . mkHsString - evalWrapper = + evalWrapper' = GHC.nlHsVar $ RdrName.mkOrig gHC_GHCI_HELPERS (mkVarOcc "evalWrapper") -- | Run a 'GhcMonad' action to compile an expression for internal usage. |