Commit 8f66bac9 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Comments only

parent 24d76153
......@@ -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
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment