summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-11-01 17:09:29 +0000
committerMatthew Pickering <matthewtpickering@gmail.com>2022-11-01 17:13:19 +0000
commit92721eb6d9731e737aa007f0f220c99a5c32572c (patch)
tree9975f24877efe63e41544ed881468bd78b37b6cd
parent270037faa124bf59dda8ba4f3d73b97d4c109a5f (diff)
downloadhaskell-wip/docs-core-prog.tar.gz
Clarify status of bindings in WholeCoreBindingswip/docs-core-prog
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.hs4
-rw-r--r--compiler/GHC/Unit/Module/WholeCoreBindings.hs6
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 8e84abbf57..ad29d06246 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.
}