Split SynTyCon to SynonymTyCon and FamilyTyCon
authorJan Stolarek <jan.stolarek@p.lodz.pl>
Wed, 19 Nov 2014 21:03:05 +0000 (22:03 +0100)
committerJan Stolarek <jan.stolarek@p.lodz.pl>
Thu, 20 Nov 2014 17:56:36 +0000 (18:56 +0100)
commit696fc4ba5b36f478d8daec56656ebf7d99e18159
tree17837c1712b5b042cc92f8ca8687f5d08f5c84aa
parent64cb49686457c233d0f58e5cfa324ad28a5453a3
Split SynTyCon to SynonymTyCon and FamilyTyCon

This patch refactors internal representation of type synonyms and type families by splitting them into two separate data constructors of TyCon data type. The main motivation is is that some fields make sense only for type synonyms and some make sense only for type families. This will be even more true with the upcoming injective type families.

There is also some refactoring of names to keep the naming constistent. And thus tc_kind field has become tyConKind and tc_roles has become tcRoles. Both changes are not visible from the outside of TyCon module.

Updates haddock submodule

Reviewers: simonpj

Differential Revision: https://phabricator.haskell.org/D508

GHC Trac Issues: #9812
29 files changed:
compiler/coreSyn/CoreLint.lhs
compiler/iface/BuildTyCl.lhs
compiler/iface/IfaceSyn.lhs
compiler/iface/MkIface.lhs
compiler/iface/TcIface.lhs
compiler/main/GHC.hs
compiler/prelude/TysPrim.lhs
compiler/stgSyn/StgLint.lhs
compiler/typecheck/TcCanonical.lhs
compiler/typecheck/TcDeriv.lhs
compiler/typecheck/TcErrors.lhs
compiler/typecheck/TcFlatten.lhs
compiler/typecheck/TcInstDcls.lhs
compiler/typecheck/TcInteract.lhs
compiler/typecheck/TcRnDriver.lhs
compiler/typecheck/TcRnTypes.lhs
compiler/typecheck/TcSMonad.lhs
compiler/typecheck/TcSimplify.lhs
compiler/typecheck/TcSplice.lhs
compiler/typecheck/TcTyClsDecls.lhs
compiler/typecheck/TcTyDecls.lhs
compiler/typecheck/TcType.lhs
compiler/typecheck/TcTypeNats.hs
compiler/typecheck/TcUnify.lhs
compiler/typecheck/TcValidity.lhs
compiler/types/FamInstEnv.lhs
compiler/types/TyCon.lhs
compiler/vectorise/Vectorise/Type/Env.hs
utils/haddock