[commit: ghc] overlapping-tyfams, master: Revise implementation of overlapping type family instances. (569b265)
Richard Eisenberg
eir at cis.upenn.edu
Fri Jun 21 15:17:40 CEST 2013
Repository : http://darcs.haskell.org/ghc.git/
On branches: overlapping-tyfams,master
https://github.com/ghc/ghc/commit/569b26526403df4d88fe2a6d64c7dade09d003ad
>---------------------------------------------------------------
commit 569b26526403df4d88fe2a6d64c7dade09d003ad
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date: Fri Jun 21 13:54:49 2013 +0100
Revise implementation of overlapping type family instances.
This commit changes the syntax and story around overlapping type
family instances. Before, we had "unbranched" instances and
"branched" instances. Now, we have closed type families and
open ones.
The behavior of open families is completely unchanged. In particular,
coincident overlap of open type family instances still works, despite
emails to the contrary.
A closed type family is declared like this:
> type family F a where
> F Int = Bool
> F a = Char
The equations are tried in order, from top to bottom, subject to
certain constraints, as described in the user manual. It is not
allowed to declare an instance of a closed family.
compiler/coreSyn/CoreLint.lhs | 2 +-
compiler/deSugar/DsMeta.hs | 115 +--
compiler/hsSyn/Convert.lhs | 15 +-
compiler/hsSyn/HsDecls.lhs | 72 +-
compiler/iface/BinIface.hs | 27 +-
compiler/iface/BuildTyCl.lhs | 2 +-
compiler/iface/IfaceEnv.lhs | 2 +-
compiler/iface/IfaceSyn.lhs | 74 +-
compiler/iface/IfaceType.lhs | 2 +-
compiler/iface/MkIface.lhs | 45 +-
compiler/iface/TcIface.lhs | 44 +-
compiler/iface/TcIface.lhs-boot | 4 +-
compiler/main/GHC.hs | 6 +-
compiler/main/HscMain.hs | 2 +-
compiler/main/HscTypes.lhs | 16 +-
compiler/main/InteractiveEval.hs | 4 +-
compiler/main/PprTyThing.hs | 13 +-
compiler/main/TidyPgm.lhs | 2 +-
compiler/parser/Parser.y.pp | 21 +-
compiler/parser/RdrHsSyn.lhs | 32 +-
compiler/prelude/TysPrim.lhs | 1 +
compiler/rename/RnSource.lhs | 30 +-
compiler/typecheck/FamInst.lhs | 101 ++-
compiler/typecheck/TcDeriv.lhs | 19 +-
compiler/typecheck/TcEnv.lhs | 5 +-
compiler/typecheck/TcExpr.lhs | 3 +-
compiler/typecheck/TcGenDeriv.lhs | 5 +-
compiler/typecheck/TcGenGenerics.lhs | 10 +-
compiler/typecheck/TcHsType.lhs | 2 +-
compiler/typecheck/TcInstDcls.lhs | 70 +-
compiler/typecheck/TcInteract.lhs | 15 +-
compiler/typecheck/TcRnDriver.lhs | 26 +-
compiler/typecheck/TcRnTypes.lhs | 2 +-
compiler/typecheck/TcSMonad.lhs | 29 +-
compiler/typecheck/TcSplice.lhs | 67 +-
compiler/typecheck/TcTyClsDecls.lhs | 162 +++--
compiler/typecheck/TcValidity.lhs | 18 +-
compiler/types/CoAxiom.lhs | 84 ++-
compiler/types/Coercion.lhs | 60 +-
compiler/types/FamInstEnv.lhs | 834 +++++++++++-----------
compiler/types/OptCoercion.lhs | 23 +-
compiler/types/TyCon.lhs | 70 +-
compiler/types/Unify.lhs | 108 ++-
compiler/vectorise/Vectorise.hs | 3 +-
compiler/vectorise/Vectorise/Env.hs | 2 +-
compiler/vectorise/Vectorise/Generic/PAMethods.hs | 4 +-
compiler/vectorise/Vectorise/Generic/PData.hs | 9 +-
compiler/vectorise/Vectorise/Monad/InstEnv.hs | 2 +-
compiler/vectorise/Vectorise/Type/Env.hs | 2 +-
compiler/vectorise/Vectorise/Utils/Base.hs | 6 +-
compiler/vectorise/Vectorise/Utils/PADict.hs | 2 +-
docs/core-spec/CoreLint.ott | 32 +-
docs/core-spec/CoreSyn.ott | 4 +-
docs/core-spec/Makefile | 1 +
docs/core-spec/core-spec.mng | 15 +-
docs/core-spec/core-spec.pdf | Bin 308357 -> 334136 bytes
docs/users_guide/glasgow_exts.xml | 211 +++---
ghc/InteractiveUI.hs | 4 +-
58 files changed, 1402 insertions(+), 1139 deletions(-)
Diff suppressed because of size. To see it, use:
git show 569b26526403df4d88fe2a6d64c7dade09d003ad
More information about the ghc-commits
mailing list