diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2022-03-21 23:05:07 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-03-25 11:37:47 -0400 |
commit | 940feaf3c2334d6eb8b66bd9d3edd560f789c94f (patch) | |
tree | d5641c5741cfa56d551f95d9fc95db452813f1b0 /compiler/GHC.hs | |
parent | 7cc1184aec70e817a47f99d09e103c275e2a4b9a (diff) | |
download | haskell-940feaf3c2334d6eb8b66bd9d3edd560f789c94f.tar.gz |
Modularize Tidy (#17957)
- Factorize Tidy options into TidyOpts datatype. Initialize it in
GHC.Driver.Config.Tidy
- Same thing for StaticPtrOpts
- Perform lookups of unpackCString[Utf8]# once in initStaticPtrOpts
instead of for every use of mkStringExprWithFS
Diffstat (limited to 'compiler/GHC.hs')
-rw-r--r-- | compiler/GHC.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/GHC.hs b/compiler/GHC.hs index c62f4baa3b..b573f2769e 100644 --- a/compiler/GHC.hs +++ b/compiler/GHC.hs @@ -338,7 +338,6 @@ import GHC.Parser.Utils import GHC.Iface.Load ( loadSysInterface ) import GHC.Hs import GHC.Builtin.Types.Prim ( alphaTyVars ) -import GHC.Iface.Tidy import GHC.Data.StringBuffer import GHC.Data.FastString import qualified GHC.LanguageExtensions as LangExt @@ -1330,12 +1329,12 @@ compileCore simplify fn = do if simplify then do -- If simplify is true: simplify (hscSimplify), then tidy - -- (tidyProgram). + -- (hscTidy). hsc_env <- getSession simpl_guts <- liftIO $ do plugins <- readIORef (tcg_th_coreplugins tcg) hscSimplify hsc_env plugins mod_guts - tidy_guts <- liftIO $ tidyProgram hsc_env simpl_guts + tidy_guts <- liftIO $ hscTidy hsc_env simpl_guts return $ Left tidy_guts else return $ Right mod_guts |