[commit: ghc] master: Comments only (8f66bac)

git at git.haskell.org git at git.haskell.org
Thu Mar 31 07:01:51 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/8f66bac9ba4c3ebe6c26b0c72e03b6754782ecbe/ghc

>---------------------------------------------------------------

commit 8f66bac9ba4c3ebe6c26b0c72e03b6754782ecbe
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Tue Mar 29 09:57:06 2016 +0100

    Comments only


>---------------------------------------------------------------

8f66bac9ba4c3ebe6c26b0c72e03b6754782ecbe
 compiler/basicTypes/DataCon.hs   | 16 +++++++---------
 compiler/typecheck/TcSimplify.hs |  2 +-
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/compiler/basicTypes/DataCon.hs b/compiler/basicTypes/DataCon.hs
index 1e4af2d..9a754dd 100644
--- a/compiler/basicTypes/DataCon.hs
+++ b/compiler/basicTypes/DataCon.hs
@@ -291,10 +291,9 @@ data DataCon
         --      dcRepTyCon       = T
 
         -- In general, the dcUnivTyVars are NOT NECESSARILY THE SAME AS THE TYVARS
-        -- FOR THE PARENT TyCon. With GADTs the data con might not even have
-        -- the same number of type variables!
-        -- [This is a change (Oct05): previously, vanilla datacons guaranteed to
-        --  have the same type variables as their parent TyCon, but that seems ugly.]
+        -- FOR THE PARENT TyCon. (This is a change (Oct05): previously, vanilla
+        -- datacons guaranteed to have the same type variables as their parent TyCon,
+        -- but that seems ugly.)
 
         dcVanilla :: Bool,      -- True <=> This is a vanilla Haskell 98 data constructor
                                 --          Its type is of form
@@ -307,12 +306,11 @@ data DataCon
                 --       The declaration format is held in the TyCon (algTcGadtSyntax)
 
         -- Universally-quantified type vars [a,b,c]
+        -- INVARIANT: length matches arity of the dcRepTyCon
+        -- INVARIANT: result type of data con worker is exactly (T a b c)
         dcUnivTyVars    :: [TyVar],     -- Two linked fields
         dcUnivTyBinders :: [TyBinder],  -- see Note [TyBinders in DataCons]
 
-            -- INVARIANT: length matches arity of the dcRepTyCon
-            --
-            -- INFARIANT: result type of (rep) data con is exactly (T a b c)
 
         -- Existentially-quantified type vars [x,y]
         dcExTyVars     :: [TyVar],     -- Two linked fields
@@ -441,8 +439,8 @@ Specifically:
    the corresponding tyvar in the TyVars list.
 
  * Each Visibilty flag (va, vb, etc) is Invisible or Specified.
-   None are Visible. (See Note [No Visible TyBinder in terms];
-   a DataCon is a term-level function.)
+   None are Visible. (A DataCon is a term-level function; see
+   Note [No Visible TyBinder in terms] in TyCoRep.)
 
 Why store these fields redundantly?  Purely convenience.  In most
 places in GHC, it's just the TyVars that are needed, so that's what's
diff --git a/compiler/typecheck/TcSimplify.hs b/compiler/typecheck/TcSimplify.hs
index 51a3588..3adb77e 100644
--- a/compiler/typecheck/TcSimplify.hs
+++ b/compiler/typecheck/TcSimplify.hs
@@ -768,7 +768,7 @@ decideQuantification apply_mr sigs name_taus constraints
           -- to *. So, don't grow the kvs.
 
        ; constraints <- TcM.zonkTcTypes constraints
-                 -- quantiyTyVars turned some meta tyvars into
+                 -- quantifyTyVars turned some meta tyvars into
                  -- quantified skolems, so we have to zonk again
 
        ; let theta     = pickQuantifiablePreds (mkVarSet qtvs) constraints



More information about the ghc-commits mailing list