Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/6403540416c22421516c91b12df630d4dce17686

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

commit 6403540416c22421516c91b12df630d4dce17686
Merge: a44c3d9... bcb5995...
Author: Simon Peyton Jones <[email protected]>
Date:   Mon Mar 26 09:12:57 2012 +0100

    Merge branch 'master' of http://darcs.haskell.org//ghc
    
    Conflicts:
        compiler/hsSyn/Convert.lhs
        compiler/hsSyn/HsDecls.lhs

 compiler/basicTypes/Name.lhs                  |    3 +
 compiler/basicTypes/OccName.lhs               |    8 ++-
 compiler/basicTypes/RdrName.lhs               |    4 +
 compiler/cmm/Cmm.hs                           |    8 --
 compiler/codeGen/ClosureInfo.lhs              |    8 ++
 compiler/codeGen/StgCmmClosure.hs             |    7 ++
 compiler/coreSyn/CoreLint.lhs                 |   10 +++
 compiler/coreSyn/MkExternalCore.lhs           |   11 ++--
 compiler/coreSyn/TrieMap.lhs                  |   38 ++++++++++-
 compiler/deSugar/Desugar.lhs                  |    2 +-
 compiler/deSugar/DsBinds.lhs                  |   91 ++++++++++++++-----------
 compiler/deSugar/DsExpr.lhs                   |    8 ++-
 compiler/deSugar/Match.lhs                    |    2 +-
 compiler/deSugar/MatchCon.lhs                 |   15 +++--
 compiler/hsSyn/Convert.lhs                    |    1 -
 compiler/hsSyn/HsDecls.lhs                    |    4 +-
 compiler/hsSyn/HsImpExp.lhs                   |   19 ++++--
 compiler/hsSyn/HsSyn.lhs                      |    3 +-
 compiler/hsSyn/HsTypes.lhs                    |   18 +++++
 compiler/iface/BinIface.hs                    |   20 ++++++
 compiler/iface/IfaceSyn.lhs                   |    1 +
 compiler/iface/IfaceType.lhs                  |   26 +++++++-
 compiler/iface/TcIface.lhs                    |    7 ++
 compiler/main/DynFlags.hs                     |    9 ++-
 compiler/parser/Lexer.x                       |   14 ++++
 compiler/parser/Parser.y.pp                   |   36 +++++-----
 compiler/parser/RdrHsSyn.lhs                  |   51 ++++++++++++++-
 compiler/prelude/PrelNames.lhs                |   43 +++++++++++-
 compiler/prelude/TysPrim.lhs                  |    7 ++
 compiler/rename/RnNames.lhs                   |    2 +-
 compiler/rename/RnTypes.lhs                   |    8 ++
 compiler/stgSyn/StgLint.lhs                   |    7 --
 compiler/typecheck/TcCanonical.lhs            |    5 ++
 compiler/typecheck/TcErrors.lhs               |    1 +
 compiler/typecheck/TcEvidence.lhs             |   49 +++++++++++++
 compiler/typecheck/TcForeign.lhs              |    4 +-
 compiler/typecheck/TcHsSyn.lhs                |    1 +
 compiler/typecheck/TcHsType.lhs               |    7 ++
 compiler/typecheck/TcInteract.lhs             |   10 +++
 compiler/typecheck/TcMType.lhs                |    8 ++-
 compiler/typecheck/TcSimplify.lhs             |    3 +-
 compiler/typecheck/TcSplice.lhs               |    5 ++
 compiler/typecheck/TcTyDecls.lhs              |    6 +-
 compiler/typecheck/TcType.lhs                 |   24 +++++--
 compiler/typecheck/TcUnify.lhs                |    5 ++
 compiler/types/Coercion.lhs                   |    1 +
 compiler/types/FamInstEnv.lhs                 |    1 +
 compiler/types/Kind.lhs                       |    1 +
 compiler/types/Type.lhs                       |   47 ++++++++++++-
 compiler/types/TypeRep.lhs                    |   27 +++++++-
 compiler/utils/ListSetOps.lhs                 |    6 --
 compiler/vectorise/Vectorise/Convert.hs       |    9 ++-
 compiler/vectorise/Vectorise/Type/Classify.hs |    1 +
 compiler/vectorise/Vectorise/Type/Type.hs     |    1 +
 mk/validate-settings.mk                       |    2 +-
 55 files changed, 585 insertions(+), 130 deletions(-)

diff --cc compiler/hsSyn/Convert.lhs
index d5f1d71,b0cd2f4..90deaa7
--- a/compiler/hsSyn/Convert.lhs
+++ b/compiler/hsSyn/Convert.lhs
@@@ -287,10 -280,29 +287,9 @@@ cvt_tyinst_hdr :: TH.Cxt -> TH.Name -> 
  cvt_tyinst_hdr cxt tc tys
    = do { cxt' <- cvtContext cxt
         ; tc'  <- tconNameL tc
 -       ; tvs  <- concatMapM collect tys
 -       ; tvs' <- cvtTvs tvs
         ; tys' <- mapM cvtType tys
 -       ; return (cxt', tc', tvs', Just tys') 
 -       }
 -  where
 -    collect (ForallT _ _ _) 
 -      = failWith $ text "Forall type not allowed as type parameter"
 -    collect (VarT tv)    = return [PlainTV tv]
 -    collect (ConT _)     = return []
 -    collect (TupleT _)   = return []
 -    collect (UnboxedTupleT _) = return []
 -    collect ArrowT       = return []
 -    collect ListT        = return []
 -    collect (AppT t1 t2)
 -      = do { tvs1 <- collect t1
 -           ; tvs2 <- collect t2
 -           ; return $ tvs1 ++ tvs2
 -           }
 -    collect (SigT (VarT tv) ki) = return [KindedTV tv ki]
 -    collect (SigT ty _)         = collect ty
 -    collect (LitT _)    = return []
 +       ; return (cxt', tc', mkHsBSig tys') }
  
- 
  -------------------------------------------------------------------
  --            Partitioning declarations
  -------------------------------------------------------------------
diff --cc compiler/hsSyn/HsDecls.lhs
index b54327a,0ebb1f6..d573be5
--- a/compiler/hsSyn/HsDecls.lhs
+++ b/compiler/hsSyn/HsDecls.lhs
@@@ -614,25 -683,20 +614,25 @@@ instance OutputableBndr nam
                                       pprLHsBindsForUser methods sigs) ]
        where
          top_matter = ptext (sLit "class") 
 -                     <+> pp_decl_head (unLoc context) lclas tyvars Nothing
 +                     <+> pp_vanilla_decl_head lclas tyvars (unLoc context)
                       <+> pprFundeps (map unLoc fds)
  
 -pp_decl_head :: OutputableBndr name
 -   => HsContext name
 -   -> Located name
 +pp_vanilla_decl_head :: OutputableBndr name
 +   => Located name
     -> [LHsTyVarBndr name]
 -   -> Maybe [LHsType name]
 +   -> HsContext name
 +   -> SDoc
 +pp_vanilla_decl_head thing tyvars context
-  = hsep [pprHsContext context, ppr thing, interppSP tyvars]
++ = hsep [pprHsContext context, pprPrefixOcc (unLoc thing), interppSP tyvars]
 +
 +pp_fam_inst_head :: OutputableBndr name
 +   => Located name
 +   -> HsBndrSig [LHsType name]
 +   -> HsContext name
     -> SDoc
 -pp_decl_head context thing tyvars Nothing       -- no explicit type patterns
 -  = hsep [pprHsContext context, pprPrefixOcc (unLoc thing), interppSP tyvars]
 -pp_decl_head context thing _      (Just typats) -- explicit type patterns
 -  = hsep [ pprHsContext context, pprPrefixOcc (unLoc thing)
 -         , hsep (map (pprParendHsType.unLoc) typats)]
 +pp_fam_inst_head thing (HsBSig typats _)  context -- explicit type patterns
-    = hsep [ ptext (sLit "instancs"), pprHsContext context, ppr thing
++   = hsep [ ptext (sLit "instance"), pprHsContext context, pprPrefixOcc 
(unLoc thing)
 +          , hsep (map (pprParendHsType.unLoc) typats)]
  
  pp_condecls :: OutputableBndr name => [LConDecl name] -> SDoc
  pp_condecls cs@(L _ ConDecl{ con_res = ResTyGADT _ } : _) -- In GADT syntax
diff --cc compiler/parser/RdrHsSyn.lhs
index bfea5ba,b6893cf..8c4ff3c
--- a/compiler/parser/RdrHsSyn.lhs
+++ b/compiler/parser/RdrHsSyn.lhs
@@@ -11,12 -11,10 +11,13 @@@ module RdrHsSyn 
          mkHsOpApp,
          mkHsIntegral, mkHsFractional, mkHsIsString,
          mkHsDo, mkHsSplice, mkTopSpliceDecl,
 -        mkClassDecl, mkTyData, mkTyFamily, mkTySynonym,
 +        mkClassDecl, 
 +        mkTyData, mkFamInstData, 
 +        mkTySynonym, mkFamInstSynonym,
 +        mkTyFamily, 
          splitCon, mkInlinePragma,
          mkRecConstrOrUpdate, -- HsExp -> [HsFieldUpdate] -> P HsExp
+         mkTyLit,
  
          cvBindGroup,
          cvBindsAndSigs,
@@@ -132,11 -145,12 +141,12 @@@ extract_lty (L _ ty) ac
        HsDocTy ty _              -> extract_lty ty acc
        HsExplicitListTy _ tys    -> extract_ltys tys acc
        HsExplicitTupleTy _ tys   -> extract_ltys tys acc
+       HsTyLit _                 -> acc
        HsWrapTy _ _              -> panic "extract_lty"
  
 -extract_tv :: SrcSpan -> RdrName -> [Located RdrName] -> [Located RdrName]
 -extract_tv loc tv acc | isRdrTyVar tv = L loc tv : acc
 -                      | otherwise     = acc
 +extract_tv :: RdrName -> [RdrName] -> [RdrName]
 +extract_tv tv acc | isRdrTyVar tv = tv : acc
 +                  | otherwise     = acc
  
  extractGenericPatTyVars :: LHsBinds RdrName -> [Located RdrName]
  -- Get the type variables out of the type patterns in a bunch of



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to