diff options
author | Jan Stolarek <jan.stolarek@p.lodz.pl> | 2014-11-19 22:03:05 +0100 |
---|---|---|
committer | Jan Stolarek <jan.stolarek@p.lodz.pl> | 2014-11-20 18:56:36 +0100 |
commit | 696fc4ba5b36f478d8daec56656ebf7d99e18159 (patch) | |
tree | 17837c1712b5b042cc92f8ca8687f5d08f5c84aa /compiler/typecheck/TcCanonical.lhs | |
parent | 64cb49686457c233d0f58e5cfa324ad28a5453a3 (diff) | |
download | haskell-696fc4ba5b36f478d8daec56656ebf7d99e18159.tar.gz |
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
Diffstat (limited to 'compiler/typecheck/TcCanonical.lhs')
-rw-r--r-- | compiler/typecheck/TcCanonical.lhs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/typecheck/TcCanonical.lhs b/compiler/typecheck/TcCanonical.lhs index 2b5efc3a6e..9b93815672 100644 --- a/compiler/typecheck/TcCanonical.lhs +++ b/compiler/typecheck/TcCanonical.lhs @@ -399,9 +399,9 @@ can_eq_nc' ev ty1 ps_ty1 ty2 ps_ty2 -- so that tv ~ F ty gets flattened -- Otherwise F a ~ F a might not get solved! can_eq_nc' ev (TyConApp fn1 tys1) _ ty2 ps_ty2 - | isSynFamilyTyCon fn1 = can_eq_fam_nc ev NotSwapped fn1 tys1 ty2 ps_ty2 + | isTypeFamilyTyCon fn1 = can_eq_fam_nc ev NotSwapped fn1 tys1 ty2 ps_ty2 can_eq_nc' ev ty1 ps_ty1 (TyConApp fn2 tys2) _ - | isSynFamilyTyCon fn2 = can_eq_fam_nc ev IsSwapped fn2 tys2 ty1 ps_ty1 + | isTypeFamilyTyCon fn2 = can_eq_fam_nc ev IsSwapped fn2 tys2 ty1 ps_ty1 -- Type variable on LHS or RHS are next can_eq_nc' ev (TyVarTy tv1) _ ty2 ps_ty2 |