From 7d9e52bc337d25a77b449cb0eacb9e3844c412dd Mon Sep 17 00:00:00 2001 From: Krzysztof Gogolewski Date: Thu, 27 Oct 2022 19:18:02 +0200 Subject: Typo: rename -fwrite-if-simplfied-core to -fwrite-if-simplified-core --- compiler/GHC/Driver/Main.hs | 6 +++--- compiler/GHC/Driver/Session.hs | 2 +- compiler/GHC/Unit/Module/WholeCoreBindings.hs | 4 ++-- docs/users_guide/phases.rst | 8 ++++---- testsuite/tests/driver/fat-iface/Makefile | 18 +++++++++--------- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/compiler/GHC/Driver/Main.hs b/compiler/GHC/Driver/Main.hs index a130fed062..884e93290c 100644 --- a/compiler/GHC/Driver/Main.hs +++ b/compiler/GHC/Driver/Main.hs @@ -867,7 +867,7 @@ hscRecompStatus -- If missing object code, just say we need to recompile because of object code. (_, OutOfDateItem reason _) -> OutOfDateItem reason Nothing -- If just missing byte code, just use the object code - -- so you should use -fprefer-byte-code with -fwrite-if-simplfied-core or you'll + -- so you should use -fprefer-byte-code with -fwrite-if-simplified-core or you'll -- end up using bytecode on recompilation (_, UpToDateItem {} ) -> just_o @@ -876,7 +876,7 @@ hscRecompStatus -- If missing object code, just say we need to recompile because of object code. (_, OutOfDateItem reason _) -> OutOfDateItem reason Nothing -- If just missing byte code, just use the object code - -- so you should use -fprefer-byte-code with -fwrite-if-simplfied-core or you'll + -- so you should use -fprefer-byte-code with -fwrite-if-simplified-core or you'll -- end up using bytecode on recompilation (OutOfDateItem reason _, _ ) -> OutOfDateItem reason Nothing @@ -1129,7 +1129,7 @@ hscDesugarAndSimplify summary (FrontendTypecheck tc_result) tc_warnings mb_old_h return $ HscUpdate iface - -- We are not generating code or writing an interface with simplfied core so we can skip simplification + -- We are not generating code or writing an interface with simplified core so we can skip simplification -- and generate a simple interface. _ -> do (iface, _details) <- liftIO $ diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs index 1b2840cf2a..3e205402e9 100644 --- a/compiler/GHC/Driver/Session.hs +++ b/compiler/GHC/Driver/Session.hs @@ -3481,7 +3481,7 @@ fFlagsDeps = [ flagSpec "strictness" Opt_Strictness, flagSpec "use-rpaths" Opt_RPath, flagSpec "write-interface" Opt_WriteInterface, - flagSpec "write-if-simplfied-core" Opt_WriteIfSimplifiedCore, + flagSpec "write-if-simplified-core" Opt_WriteIfSimplifiedCore, flagSpec "write-ide-info" Opt_WriteHie, flagSpec "unbox-small-strict-fields" Opt_UnboxSmallStrictFields, flagSpec "unbox-strict-fields" Opt_UnboxStrictFields, diff --git a/compiler/GHC/Unit/Module/WholeCoreBindings.hs b/compiler/GHC/Unit/Module/WholeCoreBindings.hs index 8e84abbf57..f6b900f2f2 100644 --- a/compiler/GHC/Unit/Module/WholeCoreBindings.hs +++ b/compiler/GHC/Unit/Module/WholeCoreBindings.hs @@ -34,7 +34,7 @@ The lifecycle of a WholeCoreBindings typically proceeds as follows: 3. Then when bytecode is needed, the LoadedBCOs value is inspected and unpacked and the linkable is used as before. -The flag `-fwrite-if-simplfied-core` determines whether the extra information is written +The flag `-fwrite-if-simplified-core` determines whether the extra information is written to an interface file. The program which is written is the core bindings of the module after whatever simplification the user requested has been performed. So the simplified core bindings of the interface file agree with the optimisation level as reported by the interface @@ -43,7 +43,7 @@ file. Note [Size of Interface Files with Core Definitions] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -How much overhead does `-fwrite-if-simplfied-core` add to a typical interface file? +How much overhead does `-fwrite-if-simplified-core` add to a typical interface file? As an experiment I compiled the `Cabal` library and `ghc` library (Aug 22) with | Project | .hi | .hi (fat) | .o | diff --git a/docs/users_guide/phases.rst b/docs/users_guide/phases.rst index c4fa26e3d5..aa171c2055 100644 --- a/docs/users_guide/phases.rst +++ b/docs/users_guide/phases.rst @@ -641,7 +641,7 @@ Options affecting code generation useful if you want to type check over multiple runs of GHC without compiling dependencies. -.. ghc-flag:: -fwrite-if-simplfied-core +.. ghc-flag:: -fwrite-if-simplified-core :shortdesc: Write an interface file containing the simplified core of the module. :type: dynamic :category: codegen @@ -679,9 +679,9 @@ Options affecting code generation :category: codegen Generate object code and byte-code. This is useful with the flags - :ghc-flag:`-fprefer-byte-code` and :ghc-flag:`-fwrite-if-simplfied-core`. + :ghc-flag:`-fprefer-byte-code` and :ghc-flag:`-fwrite-if-simplified-core`. - This flag implies :ghc-flag:`-fwrite-if-simplfied-core`. + This flag implies :ghc-flag:`-fwrite-if-simplified-core`. :ghc-flag:`-fbyte-code` and :ghc-flag:`-fobject-code` disable this flag as they specify that GHC should *only* write object code or byte-code respectively. @@ -787,7 +787,7 @@ Options affecting code generation and object file (if that's available) to evaluate and run TH splices. This is useful with flags such as :ghc-flag:`-fbyte-code-and-object-code`, which - tells the compiler to generate byte-code, and :ghc-flag:`-fwrite-if-simplfied-core` which + tells the compiler to generate byte-code, and :ghc-flag:`-fwrite-if-simplified-core` which allows byte-code to be generated from an interface file. This flag also interacts with :ghc-flag:`-fno-code`, if this flag is enabled diff --git a/testsuite/tests/driver/fat-iface/Makefile b/testsuite/tests/driver/fat-iface/Makefile index 703247f139..7241e48333 100644 --- a/testsuite/tests/driver/fat-iface/Makefile +++ b/testsuite/tests/driver/fat-iface/Makefile @@ -8,7 +8,7 @@ clean: rm -f *.hi *.hi-fat *.o fat001: clean - "$(TEST_HC)" $(TEST_HC_OPTS) -c Fat.hs -fwrite-if-simplfied-core -dno-typeable-binds + "$(TEST_HC)" $(TEST_HC_OPTS) -c Fat.hs -fwrite-if-simplified-core -dno-typeable-binds test -f Fat.hi "$(TEST_HC)" $(TEST_HC_OPTS) --show-iface Fat.hi | grep -A3 "extra decls" @@ -23,30 +23,30 @@ fat007: clean fat006: clean - "$(TEST_HC)" $(TEST_HC_OPTS) -c Fat.hs -dno-typeable-binds -fno-code -fwrite-if-simplfied-core + "$(TEST_HC)" $(TEST_HC_OPTS) -c Fat.hs -dno-typeable-binds -fno-code -fwrite-if-simplified-core test -f Fat.hi "$(TEST_HC)" $(TEST_HC_OPTS) --show-iface Fat.hi | grep -A3 "extra decls" test ! -f Fat.o fat006a: clean - "$(TEST_HC)" $(TEST_HC_OPTS) -c Fat.hs -dno-typeable-binds -fno-code -fwrite-if-simplfied-core -O2 + "$(TEST_HC)" $(TEST_HC_OPTS) -c Fat.hs -dno-typeable-binds -fno-code -fwrite-if-simplified-core -O2 fat008: clean - "$(TEST_HC)" $(TEST_HC_OPTS) FatTH.hs -fwrite-if-simplfied-core -fprefer-byte-code + "$(TEST_HC)" $(TEST_HC_OPTS) FatTH.hs -fwrite-if-simplified-core -fprefer-byte-code echo >> "FatTH.hs" # Observe that FatQuote.hs is not recompiled and the fat interface is used. - "$(TEST_HC)" $(TEST_HC_OPTS) FatTH.hs -fwrite-if-simplfied-core -fprefer-byte-code + "$(TEST_HC)" $(TEST_HC_OPTS) FatTH.hs -fwrite-if-simplified-core -fprefer-byte-code # Same as fat008 but with ghci, broken due to recompilation checking wibbles fat009: clean - echo ":q" | "$(TEST_HC)" $(TEST_HC_OPTS_INTERACTIVE) FatTH.hs -fwrite-if-simplfied-core - echo ":q" | "$(TEST_HC)" $(TEST_HC_OPTS_INTERACTIVE) FatTH.hs -fwrite-if-simplfied-core + echo ":q" | "$(TEST_HC)" $(TEST_HC_OPTS_INTERACTIVE) FatTH.hs -fwrite-if-simplified-core + echo ":q" | "$(TEST_HC)" $(TEST_HC_OPTS_INTERACTIVE) FatTH.hs -fwrite-if-simplified-core fat010: clean - "$(TEST_HC)" $(TEST_HC_OPTS) THC.hs -fhide-source-paths -fwrite-if-simplfied-core -fprefer-byte-code + "$(TEST_HC)" $(TEST_HC_OPTS) THC.hs -fhide-source-paths -fwrite-if-simplified-core -fprefer-byte-code echo >> "THB.hs" - "$(TEST_HC)" $(TEST_HC_OPTS) THC.hs -fhide-source-paths -fwrite-if-simplfied-core -fprefer-byte-code + "$(TEST_HC)" $(TEST_HC_OPTS) THC.hs -fhide-source-paths -fwrite-if-simplified-core -fprefer-byte-code -- cgit v1.2.1