[commit: ghc] master: Comments and white space only (8d82954)

git at git.haskell.org git
Fri Oct 4 18:16:19 UTC 2013


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

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

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

commit 8d829544304f98b441d366e793f3eac69e39801f
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Fri Oct 4 18:47:15 2013 +0100

    Comments and white space only


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

8d829544304f98b441d366e793f3eac69e39801f
 compiler/typecheck/TcTyClsDecls.lhs |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/compiler/typecheck/TcTyClsDecls.lhs b/compiler/typecheck/TcTyClsDecls.lhs
index e9eb5d1..c4d24d4 100644
--- a/compiler/typecheck/TcTyClsDecls.lhs
+++ b/compiler/typecheck/TcTyClsDecls.lhs
@@ -461,8 +461,12 @@ kcTyClDecl :: TyClDecl Name -> TcM ()
 kcTyClDecl (DataDecl { tcdLName = L _ name, tcdTyVars = hs_tvs, tcdDataDefn = defn })
   | HsDataDefn { dd_cons = cons, dd_kindSig = Just _ } <- defn
   = mapM_ (wrapLocM (kcConDecl name)) cons
-    -- hs_tvs and td_kindSig already dealt with in getInitialKind
-    -- Ignore the dd_ctxt; heavily deprecated and inconvenient
+    -- hs_tvs and dd_kindSig already dealt with in getInitialKind
+    -- If dd_kindSig is Just, this must be a GADT-style decl,
+    --        (see invariants of DataDefn declaration)
+    -- so (a) we don't need to bring the hs_tvs into scope, because the
+    --        ConDecls bind all their own variables
+    --    (b) dd_ctxt is not allowed for GADT-style decls, so we can ignore it
 
   | HsDataDefn { dd_ctxt = ctxt, dd_cons = cons } <- defn
   = kcTyClTyVars name hs_tvs $




More information about the ghc-commits mailing list