[Git][ghc/ghc][master] Clarify status of bindings in WholeCoreBindings

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Thu Nov 3 06:01:01 UTC 2022



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
a9fc15b1 by Matthew Pickering at 2022-11-03T02:00:49-04:00
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

- - - - -


2 changed files:

- compiler/GHC/IfaceToCore.hs
- compiler/GHC/Unit/Module/WholeCoreBindings.hs


Changes:

=====================================
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
 
 
 {-


=====================================
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.
             }



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a9fc15b1228d557c2241a28ac702d4a6e140d975

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a9fc15b1228d557c2241a28ac702d4a6e140d975
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20221103/5b60f306/attachment-0001.html>


More information about the ghc-commits mailing list