[Git][ghc/ghc][wip/issue-23832] @sheaf's comment/naming suggestions

Gergő Érdi (@cactus) gitlab at gitlab.haskell.org
Fri Aug 18 01:54:26 UTC 2023



Gergő Érdi pushed to branch wip/issue-23832 at Glasgow Haskell Compiler / GHC


Commits:
eebdf40c by sheaf at 2023-08-18T01:54:20+00:00
@sheaf's comment/naming suggestions
- - - - -


2 changed files:

- compiler/GHC/Tc/Solver.hs
- compiler/GHC/Tc/Types.hs


Changes:

=====================================
compiler/GHC/Tc/Solver.hs
=====================================
@@ -3697,9 +3697,9 @@ disambigGroup :: [Type]            -- The default types
 disambigGroup default_tys (the_tv, wanteds)
   = disambigMultiGroup [[default_ty] | default_ty <- default_tys] [the_tv] wanteds
 
-disambigMultiGroup :: [[Type]]            -- The default type assignments to try
-                   -> [TcTyVar]  -- Variables to default
-                   -> [Ct]       -- All constraints sharing same type variables
+disambigMultiGroup :: [[Type]]   -- ^ default type assignments to try
+                   -> [TcTyVar]  -- ^ variables to default
+                   -> [Ct]       -- ^ check these are solved by defaulting
                    -> TcS Bool   -- True <=> something happened, reflected in ty_binds
 disambigMultiGroup defaults the_tvs wanteds = anyM propose defaults
   where


=====================================
compiler/GHC/Tc/Types.hs
=====================================
@@ -1052,13 +1052,16 @@ data TcPluginRewriteResult
     , tcRewriterNewWanteds :: [Ct]
     }
 
--- | A collection of candidate default types for a type variable.
+-- | A collection of candidate default types for sets of type variables.
 data DefaultingProposal
   = DefaultingProposal
     { deProposalTyVars :: [TcTyVar]
-      -- ^ The type variable to default.
+      -- ^ The type variables to default.
     , deProposalCandidates :: [[Type]]
-      -- ^ Candidate types to default the type variable to.
+      -- ^ Candidate types to default the type variables to.
+      --
+      -- All of the inner lists should have the same length as the
+      -- list of type variables we are defaulting.
     , deProposalCts :: [Ct]
       -- ^ The constraints against which defaults are checked.
     }



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/eebdf40c59ae15bc7409780ae20056cf90cb2bad
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/20230817/c4697b2e/attachment-0001.html>


More information about the ghc-commits mailing list