Record the type in TuplePat (necessary for GADTs)
[ghc-hetmet.git] / ghc / compiler / rename / RnTypes.lhs
index 31279ff..bfd0289 100644 (file)
@@ -47,7 +47,7 @@ import SrcLoc         ( SrcSpan, Located(..), unLoc, noLoc, combineLocs )
 import NameSet
 
 import Literal         ( inIntRange, inCharRange )
-import BasicTypes      ( compareFixity, funTyFixity, negateFixity, compareFixity,
+import BasicTypes      ( compareFixity, funTyFixity, negateFixity, 
                          Fixity(..), FixityDirection(..) )
 import ListSetOps      ( removeDups )
 import Outputable
@@ -99,7 +99,7 @@ rnHsType doc (HsForAllTy Implicit _ ctxt ty)
        -- class signatures:
        --      class C a where { op :: a -> a }
        forall_tyvars = filter (not . (`elemLocalRdrEnv` name_env) . unLoc) mentioned
-       tyvar_bndrs = [ L loc (UserTyVar v) | (L loc v) <- forall_tyvars ]
+       tyvar_bndrs   = userHsTyVarBndrs forall_tyvars
     in
     rnForAll doc Implicit tyvar_bndrs ctxt ty
 
@@ -617,10 +617,11 @@ rnPat (PArrPat pats _)
   where
     implicit_fvs = mkFVs [lengthPName, indexPName]
 
-rnPat (TuplePat pats boxed)
+rnPat (TuplePat pats boxed _)
   = checkTupSize tup_size      `thenM_`
     rnLPats pats                       `thenM` \ (patslist, fvs) ->
-    returnM (TuplePat patslist boxed, fvs `addOneFV` tycon_name)
+    returnM (TuplePat patslist boxed placeHolderType, 
+            fvs `addOneFV` tycon_name)
   where
     tup_size   = length pats
     tycon_name = tupleTyCon_name boxed tup_size