Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/525aca2c11c510ce83a593b6cedfacc54a2b7806 >--------------------------------------------------------------- commit 525aca2c11c510ce83a593b6cedfacc54a2b7806 Author: Simon Peyton Jones <[email protected]> Date: Sat Jul 23 18:36:58 2011 +0100 A nice tidy-up for CvSubst and liftCoSubst A "lifting substitition" takes a *type* to a *coercion*, using a substitution that takes a *type variable* to a *coercion*. We were using a CvSubst for this purpose, which was an awkward exception: in every other use of CvSubst, type variables map only to types. Turned out that Coercion.liftCoSubst is quite a small function, so I rewrote it with a special substitution type Coercion.LiftCoSubst, just for that purpose. In doing so I found that the function itself was bizarrely over-complicated ... a direct result of mis-using CvSubst. So this patch makes it all simpler, faster, and easier to understand. No bugs fixed though! compiler/basicTypes/Var.lhs | 3 +- compiler/basicTypes/VarSet.lhs | 5 +- compiler/coreSyn/CoreLint.lhs | 2 +- compiler/coreSyn/CoreSubst.lhs | 12 ++-- compiler/coreSyn/CoreUnfold.lhs | 7 +- compiler/iface/IfaceType.lhs | 11 ++- compiler/simplCore/SimplEnv.lhs | 6 +- compiler/types/Coercion.lhs | 117 ++++++++++++++++---------------------- compiler/types/Type.lhs | 2 +- compiler/types/TypeRep.lhs | 6 +- 10 files changed, 77 insertions(+), 94 deletions(-) Diff suppressed because of size. To see it, use: git show 525aca2c11c510ce83a593b6cedfacc54a2b7806 _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
