[commit: ghc] wip/gadtpm: Comments (7d817a0)

git at git.haskell.org git at git.haskell.org
Mon Jan 19 09:10:35 UTC 2015


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

On branch  : wip/gadtpm
Link       : http://ghc.haskell.org/trac/ghc/changeset/7d817a0db4c2dc1b3397f001e2a35804e4243053/ghc

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

commit 7d817a0db4c2dc1b3397f001e2a35804e4243053
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Mon Jan 19 09:10:08 2015 +0000

    Comments


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

7d817a0db4c2dc1b3397f001e2a35804e4243053
 compiler/deSugar/Check.hs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/compiler/deSugar/Check.hs b/compiler/deSugar/Check.hs
index 2a8dbfe..cdeacc2 100644
--- a/compiler/deSugar/Check.hs
+++ b/compiler/deSugar/Check.hs
@@ -87,6 +87,10 @@ instance Eq (PmLit id) where
 -- | The main pattern type for pattern match check. Only guards, variables,
 -- constructors, literals and negative literals. It it sufficient to represent
 -- all different patterns, apart maybe from bang and lazy patterns.
+
+-- SPJ... Say that this the term-level stuff only.
+-- Drop all types, existential type variables
+-- 
 data PmPat id = PmGuardPat PmGuard -- Note [Translation to PmPat]
               | PmVarPat { pm_ty :: Type, pm_var :: id }
               | PmConPat { pm_ty :: Type, pm_pat_con :: DataCon, pm_pat_args :: [PmPat id] }
@@ -324,6 +328,7 @@ mkConFull con = do
   return (con_pat, evvars)
 
 mkConSigSubst :: DataCon -> PmM TvSubst
+-- SPJ: not convinced that we need to make fresh uniques
 mkConSigSubst con = do
   tvs <- replicateM notys (liftPmM freshTyVarPmM)
   return (mkTopTvSubst (tyvars `zip` tvs))



More information about the ghc-commits mailing list