diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2022-10-28 21:05:34 +0200 |
---|---|---|
committer | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2022-11-04 15:54:25 +0100 |
commit | 4dd9e74bb216244c77e973eca8047447dddd1509 (patch) | |
tree | e11a998f4ca8a25badfb289e2ff540347e78acea /compiler/GHC/Runtime | |
parent | 311251543f2e37af4a121e58028bfc46267a7fc9 (diff) | |
download | haskell-wip/strings-refactor3.tar.gz |
Minor refactor around FastStringswip/strings-refactor3
Pass FastStrings to functions directly, to make sure the rule
for fsLit "literal" fires.
Remove SDoc indirection in GHCi.UI.Tags and GHC.Unit.Module.Graph.
Diffstat (limited to 'compiler/GHC/Runtime')
-rw-r--r-- | compiler/GHC/Runtime/Eval.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Runtime/Loader.hs | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/compiler/GHC/Runtime/Eval.hs b/compiler/GHC/Runtime/Eval.hs index 3acebb5894..75a6123891 100644 --- a/compiler/GHC/Runtime/Eval.hs +++ b/compiler/GHC/Runtime/Eval.hs @@ -1048,7 +1048,7 @@ parseInstanceHead str = withSession $ \hsc_env0 -> do -- Get all the constraints required of a dictionary binding getDictionaryBindings :: PredType -> TcM CtEvidence getDictionaryBindings theta = do - dictName <- newName (mkDictOcc (mkVarOcc "magic")) + dictName <- newName (mkDictOcc (mkVarOccFS (fsLit "magic"))) let dict_var = mkVanillaGlobal dictName theta loc <- getCtLocM (GivenOrigin (getSkolemInfo unkSkol)) Nothing diff --git a/compiler/GHC/Runtime/Loader.hs b/compiler/GHC/Runtime/Loader.hs index 5189e5bec4..e578c25357 100644 --- a/compiler/GHC/Runtime/Loader.hs +++ b/compiler/GHC/Runtime/Loader.hs @@ -21,6 +21,7 @@ module GHC.Runtime.Loader ( ) where import GHC.Prelude +import GHC.Data.FastString import GHC.Driver.Session import GHC.Driver.Ppr @@ -46,7 +47,7 @@ import GHC.Types.SrcLoc ( noSrcSpan ) import GHC.Types.Name ( Name, nameModule_maybe ) import GHC.Types.Id ( idType ) import GHC.Types.TyThing -import GHC.Types.Name.Occurrence ( OccName, mkVarOcc ) +import GHC.Types.Name.Occurrence ( OccName, mkVarOccFS ) import GHC.Types.Name.Reader ( RdrName, ImportSpec(..), ImpDeclSpec(..) , ImpItemSpec(..), mkGlobalRdrEnv, lookupGRE_RdrName , greMangledName, mkRdrQual ) @@ -136,14 +137,14 @@ loadPlugins hsc_env where options = [ option | (opt_mod_nm, option) <- pluginModNameOpts dflags , opt_mod_nm == mod_nm ] - loadPlugin = loadPlugin' (mkVarOcc "plugin") pluginTyConName hsc_env + loadPlugin = loadPlugin' (mkVarOccFS (fsLit "plugin")) pluginTyConName hsc_env loadFrontendPlugin :: HscEnv -> ModuleName -> IO (FrontendPlugin, [Linkable], PkgsLoaded) loadFrontendPlugin hsc_env mod_name = do checkExternalInterpreter hsc_env (plugin, _iface, links, pkgs) - <- loadPlugin' (mkVarOcc "frontendPlugin") frontendPluginTyConName + <- loadPlugin' (mkVarOccFS (fsLit "frontendPlugin")) frontendPluginTyConName hsc_env mod_name return (plugin, links, pkgs) |