diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2022-11-01 17:09:29 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-11-03 02:00:49 -0400 |
commit | a9fc15b1228d557c2241a28ac702d4a6e140d975 (patch) | |
tree | e70655ce06ce8d1e54b361d60261ada003aa2d69 | |
parent | d51bf7bd5f6ca959020e34527d869201a7c8a290 (diff) | |
download | haskell-a9fc15b1228d557c2241a28ac702d4a6e140d975.tar.gz |
Clarify status of bindings in WholeCoreBindings
Gergo points out that these bindings are tidied, rather than prepd as
the variable claims. Therefore we update the name of the variable to
reflect reality and add a comment to the data type to try to erase any
future confusion.
Fixes #22307
-rw-r--r-- | compiler/GHC/IfaceToCore.hs | 4 | ||||
-rw-r--r-- | compiler/GHC/Unit/Module/WholeCoreBindings.hs | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/compiler/GHC/IfaceToCore.hs b/compiler/GHC/IfaceToCore.hs index ad975f1b0f..0999f419b6 100644 --- a/compiler/GHC/IfaceToCore.hs +++ b/compiler/GHC/IfaceToCore.hs @@ -240,9 +240,9 @@ typecheckIface iface } typecheckWholeCoreBindings :: IORef TypeEnv -> WholeCoreBindings -> IfG [CoreBind] -typecheckWholeCoreBindings type_var (WholeCoreBindings prepd_binding this_mod _) = +typecheckWholeCoreBindings type_var (WholeCoreBindings tidy_bindings this_mod _) = initIfaceLcl this_mod (text "typecheckWholeCoreBindings") NotBoot $ do - tcTopIfaceBindings type_var prepd_binding + tcTopIfaceBindings type_var tidy_bindings {- diff --git a/compiler/GHC/Unit/Module/WholeCoreBindings.hs b/compiler/GHC/Unit/Module/WholeCoreBindings.hs index f6b900f2f2..30d6274834 100644 --- a/compiler/GHC/Unit/Module/WholeCoreBindings.hs +++ b/compiler/GHC/Unit/Module/WholeCoreBindings.hs @@ -57,7 +57,7 @@ the object files. -} data WholeCoreBindings = WholeCoreBindings - { wcb_bindings :: [IfaceBindingX IfaceMaybeRhs IfaceTopBndrInfo] - , wcb_module :: Module - , wcb_mod_location :: ModLocation + { wcb_bindings :: [IfaceBindingX IfaceMaybeRhs IfaceTopBndrInfo] -- ^ serialised tidied core bindings. + , wcb_module :: Module -- ^ The module which the bindings are for + , wcb_mod_location :: ModLocation -- ^ The location where the sources reside. } |