[commit: ghc] ghc-new-flavor: Merge branch 'master' of http://darcs.haskell.org/ghc into ghc-new-flavor (b4b7647)
dimitris at microsoft.com
dimitris at microsoft.com
Thu Mar 29 00:26:42 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : ghc-new-flavor
http://hackage.haskell.org/trac/ghc/changeset/b4b7647fedf0feab41d417c4e980bd08445ce559
>---------------------------------------------------------------
commit b4b7647fedf0feab41d417c4e980bd08445ce559
Merge: cc2d2e1... 9606231...
Author: Dimitrios Vytiniotis <dimitris at microsoft.com>
Date: Wed Mar 28 10:56:29 2012 +0200
Merge branch 'master' of http://darcs.haskell.org/ghc into ghc-new-flavor
.authorspellings | 29 -
.darcs-boring | 256 ---
aclocal.m4 | 29 +-
compiler/basicTypes/Name.lhs | 3 +
compiler/basicTypes/OccName.lhs | 8 +-
compiler/basicTypes/RdrName.lhs | 4 +
compiler/cmm/Cmm.hs | 8 -
compiler/cmm/PprC.hs | 9 +-
compiler/codeGen/ClosureInfo.lhs | 8 +
compiler/codeGen/StgCmmClosure.hs | 7 +
compiler/coreSyn/CoreLint.lhs | 27 +-
compiler/coreSyn/CorePrep.lhs | 14 +-
compiler/coreSyn/CoreSyn.lhs | 4 +-
compiler/coreSyn/CoreUtils.lhs | 90 +-
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/DsMeta.hs | 287 ++--
compiler/deSugar/DsMonad.lhs | 5 +-
compiler/deSugar/Match.lhs | 2 +-
compiler/deSugar/MatchCon.lhs | 15 +-
compiler/ghc.mk | 3 +-
compiler/ghci/Linker.lhs | 563 +++---
compiler/ghci/ObjLink.lhs | 39 +-
compiler/hsSyn/Convert.lhs | 154 +-
compiler/hsSyn/HsDecls.lhs | 365 ++--
compiler/hsSyn/HsImpExp.lhs | 19 +-
compiler/hsSyn/HsSyn.lhs | 3 +-
compiler/hsSyn/HsTypes.lhs | 40 +-
compiler/hsSyn/HsUtils.lhs | 53 +-
compiler/iface/BinIface.hs | 20 +
compiler/iface/IfaceSyn.lhs | 1 +
compiler/iface/IfaceType.lhs | 26 +-
compiler/iface/TcIface.lhs | 7 +
compiler/main/{Annotations.lhs => Annotations.hs} | 57 +-
compiler/main/DynFlags.hs | 23 +-
compiler/main/GhcMake.hs | 1246 ++++++------
compiler/main/HscStats.hs | 159 ++
compiler/main/HscStats.lhs | 12 +-
compiler/main/PackageConfig.hs | 48 +-
compiler/nativeGen/PPC/Ppr.hs | 467 +++---
compiler/nativeGen/X86/CodeGen.hs | 78 +-
compiler/nativeGen/X86/Regs.hs | 38 +-
compiler/parser/Lexer.x | 14 +
compiler/parser/Parser.y.pp | 100 +-
compiler/parser/ParserCore.y | 24 +-
compiler/parser/RdrHsSyn.lhs | 255 ++--
compiler/prelude/PrelNames.lhs | 43 +-
compiler/prelude/TysPrim.lhs | 7 +
compiler/rename/RnEnv.lhs | 19 +-
compiler/rename/RnNames.lhs | 11 +-
compiler/rename/RnSource.lhs | 243 ++-
compiler/rename/RnTypes.lhs | 119 +-
compiler/simplCore/SetLevels.lhs | 3 +-
compiler/simplCore/SimplUtils.lhs | 100 +-
compiler/simplCore/Simplify.lhs | 2 +
compiler/stgSyn/StgLint.lhs | 7 -
compiler/typecheck/TcCanonical.lhs | 5 +
compiler/typecheck/TcClassDcl.lhs | 13 +-
compiler/typecheck/TcDeriv.lhs | 104 +-
compiler/typecheck/TcEnv.lhs | 7 +-
compiler/typecheck/TcErrors.lhs | 1 +
compiler/typecheck/TcEvidence.lhs | 49 +
compiler/typecheck/TcForeign.lhs | 49 +-
compiler/typecheck/TcHsSyn.lhs | 1 +
compiler/typecheck/TcHsType.lhs | 17 +-
compiler/typecheck/TcInstDcls.lhs | 45 +-
compiler/typecheck/TcInteract.lhs | 10 +
compiler/typecheck/TcMType.lhs | 8 +-
compiler/typecheck/TcSimplify.lhs | 3 +-
compiler/typecheck/TcSplice.lhs | 5 +
compiler/typecheck/TcTyClsDecls.lhs | 221 ++-
compiler/typecheck/TcTyDecls.lhs | 6 +-
compiler/typecheck/TcType.lhs | 24 +-
compiler/typecheck/TcUnify.lhs | 5 +
compiler/types/Coercion.lhs | 1 +
compiler/types/FamInstEnv.lhs | 2 +-
compiler/types/Kind.lhs | 1 +
compiler/types/Type.lhs | 47 +-
compiler/types/TypeRep.lhs | 27 +-
compiler/utils/Digraph.lhs | 6 -
compiler/utils/ListSetOps.lhs | 6 -
compiler/utils/Outputable.lhs | 5 +-
compiler/vectorise/Vectorise/Convert.hs | 9 +-
compiler/vectorise/Vectorise/Type/Classify.hs | 1 +
compiler/vectorise/Vectorise/Type/Type.hs | 1 +
configure.ac | 117 +-
docs/coding-style.html | 28 +-
docs/index.html.in | 22 +-
docs/users_guide/flags.xml | 14 +
docs/users_guide/glasgow_exts.xml | 29 +-
docs/users_guide/runtime_control.xml | 43 +-
docs/users_guide/using.xml | 2166 +++++++++++----------
docs/vh/vh.xml | 591 +++---
driver/ghci/ghc.mk | 4 +-
driver/utils/cwrapper.c | 6 +-
ghc/GhciTags.hs | 17 +-
ghc/ghc.mk | 9 +
includes/Cmm.h | 2 +-
includes/HaskellConstants.hs | 10 +-
includes/MachDeps.h | 27 +-
includes/Rts.h | 25 +
includes/RtsAPI.h | 2 +-
includes/Stg.h | 8 +-
includes/mkDerivedConstants.c | 20 +-
includes/rts/Constants.h | 22 +-
includes/stg/DLL.h | 4 +-
includes/stg/MachRegs.h | 173 +-
mk/config.mk.in | 6 +
mk/validate-settings.mk | 2 +-
rts/Adjustor.c | 441 +++--
rts/HeapStackCheck.cmm | 10 +-
rts/Interpreter.c | 4 +-
rts/Linker.c | 37 +-
rts/PrimOps.cmm | 2 +-
rts/RtsMain.c | 4 +-
rts/Schedule.c | 2 +-
rts/StgCRun.c | 67 +-
rts/StgMiscClosures.cmm | 6 +-
rts/Trace.c | 5 +-
rts/ghc.mk | 7 +-
rts/win32/AwaitEvent.c | 4 +-
rts/win32/ThrIOManager.c | 2 +-
rts/win32/seh_excn.c | 5 +-
utils/fingerprint/fingerprint.py | 2 +-
utils/genapply/GenApply.hs | 646 +++---
utils/genprimopcode/Main.hs | 427 ++--
utils/genprimopcode/Parser.y | 1 -
utils/genprimopcode/ParserM.hs | 1 -
utils/genprimopcode/Syntax.hs | 20 +-
utils/hp2ps/Key.c | 22 +-
133 files changed, 5922 insertions(+), 5142 deletions(-)
diff --cc compiler/coreSyn/TrieMap.lhs
index fefea6d,5855ed6..7a047e3
--- a/compiler/coreSyn/TrieMap.lhs
+++ b/compiler/coreSyn/TrieMap.lhs
@@@ -519,46 -524,9 +524,47 @@@ lkT env ty
go (AppTy t1 t2) = tm_app >.> lkT env t1 >=> lkT env t2
go (FunTy t1 t2) = tm_fun >.> lkT env t1 >=> lkT env t2
go (TyConApp tc tys) = tm_tc_app >.> lkNamed tc >=> lkList (lkT env) tys
+ go (LitTy l) = tm_tylit >.> lkTyLit l
go (ForAllTy tv ty) = tm_forall >.> lkT (extendCME env tv) ty >=> lkBndr env tv
+
+lkT_mod :: CmEnv
+ -> TyVarEnv a -- A substitution
+ -> (a -> Type)
+ -> Type
+ -> TypeMap b -> Maybe b
+lkT_mod env s f ty m
+ | EmptyTM <- m = Nothing
+ | Just ty' <- coreView ty
+ = lkT_mod env s f ty' m
+ | isEmptyVarEnv candidates
+ = go env s ty m
+ | otherwise
+ = Just $ head (varEnvElts candidates) -- Yikes!
+ where
+ candidates = filterVarEnv_Directly find_matching (vm_fvar $ tm_var m)
+ find_matching tv _b = case lookupVarEnv_Directly s tv of
+ Nothing -> False
+ Just a -> f a `eqType` ty
+ go env _s (TyVarTy v) = tm_var >.> lkVar env v
+ go env s (AppTy t1 t2) = tm_app >.> lkT_mod env s f t1 >=> lkT_mod env s f t2
+ go env s (FunTy t1 t2) = tm_fun >.> lkT_mod env s f t1 >=> lkT_mod env s f t2
+ go env s (TyConApp tc tys) = tm_tc_app >.> lkNamed tc >=> lkList (lkT_mod env s f) tys
+ go _env _s (ForAllTy _tv _ty) = const Nothing
+ {- TODO: bleah the following is wrong!
+ = let (s',inscope') = substTyVarBndr tv (s,inscope)
+ in
+ let s' = delVarEnv s tv -- I think it's enough to just restrict substution
+ -- without renaming anything
+ in tm_forall >.> lkT_mod (extendCME env tv) s' f ty >=> lkBndr env tv
+ -}
+
+lookupTypeMap_mod :: TyVarEnv a -- A substitution to be applied to the /keys/ of type map
+ -> (a -> Type)
+ -> Type
+ -> TypeMap b -> Maybe b
+lookupTypeMap_mod = lkT_mod emptyCME
+
-----------------
xtT :: CmEnv -> Type -> XT a -> TypeMap a -> TypeMap a
xtT env ty f m
diff --cc compiler/typecheck/TcSimplify.lhs
index 3037628,390c70e..1e68e4b
--- a/compiler/typecheck/TcSimplify.lhs
+++ b/compiler/typecheck/TcSimplify.lhs
@@@ -1442,8 -1426,9 +1443,8 @@@ newFlatWanteds orig thet
= do { loc <- getCtLoc orig
; mapM (inst_to_wanted loc) theta }
where inst_to_wanted loc pty
- = do { v <- newWantedEvVar pty
+ = do { v <- TcMType.newWantedEvVar pty
; return $
- CNonCanonical { cc_id = v
- , cc_flavor = Wanted loc
+ CNonCanonical { cc_flavor = Wanted loc v
, cc_depth = 0 } }
- \end{code}
+ \end{code}
More information about the Cvs-ghc
mailing list