[commit: ghc] overlapping-tyfams: Added overlapping type family instances. (f428eea)
Richard Eisenberg
eir at cis.upenn.edu
Wed Aug 15 17:01:04 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : overlapping-tyfams
http://hackage.haskell.org/trac/ghc/changeset/f428eea657391f467e9b9cdefb85b552804fda42
>---------------------------------------------------------------
commit f428eea657391f467e9b9cdefb85b552804fda42
Author: Richard Eisenberg <eir at seas.upenn.edu>
Date: Sun Aug 12 15:55:55 2012 -0400
Added overlapping type family instances.
The primary change is in compiler/types/FamInstEnv.hs, where the new
lookup algorithm is written. See comments in that file for the full
details. The biggest change that could affect other people is that,
now, the top-level family instance declaration leads to a FamInstGroup,
not just a FamInst. A FamInstGroup, in turn, holds an ordered list
of FamInsts. This change required a ripple of changes throughout GHC,
including in interface files, to support it.
Still to do: clean up some code/names, allow code to compile when
it relies on a certain corner-case overlap, emit warnings/errors
when certain branches of an instance group are unreachable.
compiler/deSugar/Desugar.lhs | 4 +-
compiler/iface/BinIface.hs | 23 +-
compiler/iface/IfaceSyn.lhs | 38 +-
compiler/iface/LoadIface.lhs | 32 +-
compiler/iface/MkIface.lhs | 33 +-
compiler/iface/TcIface.lhs | 16 +-
compiler/iface/TcIface.lhs-boot | 16 +-
compiler/main/GHC.hs | 6 +-
compiler/main/HscMain.hs | 8 +-
compiler/main/HscTypes.lhs | 36 +-
compiler/main/TidyPgm.lhs | 18 +-
compiler/typecheck/FamInst.lhs | 132 +++--
compiler/typecheck/TcDeriv.lhs | 23 +-
compiler/typecheck/TcExpr.lhs | 13 +-
compiler/typecheck/TcGenDeriv.lhs | 16 +-
compiler/typecheck/TcGenGenerics.lhs | 22 +-
compiler/typecheck/TcInstDcls.lhs | 73 ++-
compiler/typecheck/TcInteract.lhs | 6 +-
compiler/typecheck/TcRnDriver.lhs | 44 +-
compiler/typecheck/TcRnMonad.lhs | 2 +-
compiler/typecheck/TcRnTypes.lhs | 2 +-
compiler/typecheck/TcSMonad.lhs | 2 +-
compiler/typecheck/TcSplice.lhs | 40 +-
compiler/types/FamInstEnv.lhs | 634 ++++++++++++++++-----
compiler/vectorise/Vectorise.hs | 11 +-
compiler/vectorise/Vectorise/Env.hs | 2 +-
compiler/vectorise/Vectorise/Generic/PAMethods.hs | 4 +-
compiler/vectorise/Vectorise/Generic/PData.hs | 16 +-
compiler/vectorise/Vectorise/Monad.hs | 2 +-
compiler/vectorise/Vectorise/Monad/InstEnv.hs | 6 +-
compiler/vectorise/Vectorise/Type/Env.hs | 22 +-
compiler/vectorise/Vectorise/Utils/Base.hs | 10 +-
compiler/vectorise/Vectorise/Utils/PADict.hs | 2 +-
ghc/InteractiveUI.hs | 2 +-
34 files changed, 875 insertions(+), 441 deletions(-)
Diff suppressed because of size. To see it, use:
git show f428eea657391f467e9b9cdefb85b552804fda42
More information about the Cvs-ghc
mailing list