[Git][ghc/ghc][wip/T23923-mikolaj-take-2] Mention a note and tweak existing comments

Mikolaj Konarski (@Mikolaj) gitlab at gitlab.haskell.org
Tue Apr 9 06:18:34 UTC 2024



Mikolaj Konarski pushed to branch wip/T23923-mikolaj-take-2 at Glasgow Haskell Compiler / GHC


Commits:
a0a7470c by Mikolaj Konarski at 2024-04-09T08:18:22+02:00
Mention a note and tweak existing comments

- - - - -


1 changed file:

- compiler/GHC/Iface/Type.hs


Changes:

=====================================
compiler/GHC/Iface/Type.hs
=====================================
@@ -433,7 +433,7 @@ data IfaceCoercion
   | IfaceCoVarCo      IfLclName
   | IfaceAxiomInstCo  IfExtName BranchIndex [IfaceCoercion]
   | IfaceAxiomRuleCo  IfLclName [IfaceCoercion]
-       -- There are only a fixed number of CoAxiomRules, so it suffices
+       -- ^ There are only a fixed number of CoAxiomRules, so it suffices
        -- to use an IfaceLclName to distinguish them.
        -- See Note [Adding built-in type families] in GHC.Builtin.Types.Literals
   | IfaceUnivCo       IfaceUnivCoProv Role IfaceType IfaceType
@@ -444,14 +444,14 @@ data IfaceCoercion
   | IfaceInstCo       IfaceCoercion IfaceCoercion
   | IfaceKindCo       IfaceCoercion
   | IfaceSubCo        IfaceCoercion
-  | IfaceFreeCoVar    CoVar    -- See Note [Free TyVars and CoVars in IfaceType]
+  | IfaceFreeCoVar    CoVar    -- ^ See Note [Free TyVars and CoVars in IfaceType]
   | IfaceHoleCo       CoVar    -- ^ See Note [Holes in IfaceCoercion]
 
 data IfaceUnivCoProv
   = IfacePhantomProv IfaceCoercion
   | IfaceProofIrrelProv IfaceCoercion
   | IfacePluginProv String [IfLclName] [Var]
-    -- Local covars and open (free) covars resp
+    -- ^ Local covars and open (free) covars resp
     -- See Note [Free TyVars and CoVars in IfaceType]
 
 
@@ -2176,6 +2176,7 @@ ppr_parend_preds preds = parens (fsep (punctuate comma (map ppr preds)))
 instance Binary IfaceType where
     put_ _ (IfaceFreeTyVar tv)
        = pprPanic "Can't serialise IfaceFreeTyVar" (ppr tv)
+           -- See Note [Free TyVars and CoVars in IfaceType]
 
     put_ bh (IfaceForAllTy aa ab) = do
             putByte bh 0
@@ -2324,9 +2325,10 @@ instance Binary IfaceCoercion where
           put_ bh b
   put_ _ (IfaceFreeCoVar cv)
        = pprPanic "Can't serialise IfaceFreeCoVar" (ppr cv)
+           -- See Note [Free TyVars and CoVars in IfaceType]
   put_ _  (IfaceHoleCo cv)
        = pprPanic "Can't serialise IfaceHoleCo" (ppr cv)
-          -- See Note [Holes in IfaceCoercion]
+           -- See Note [Holes in IfaceCoercion]
 
   get bh = do
       tag <- getByte bh
@@ -2399,6 +2401,7 @@ instance Binary IfaceUnivCoProv where
   put_ bh (IfacePluginProv a cvs fcvs) = do
           putByte bh 3
           put_ bh a
+          -- See Note [Free TyVars and CoVars in IfaceType]
           assertPpr (null fcvs) (ppr cvs $$ ppr fcvs) $
             put_ bh cvs
 



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a0a7470c55c9351bed908d5f0d09ba7b7a87c359
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/20240409/58b5afd5/attachment-0001.html>


More information about the ghc-commits mailing list