diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-09-17 11:54:20 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-09-18 17:30:15 +0100 |
commit | 58470fb7b4a25c49b567e08740dc8df01a6c3710 (patch) | |
tree | 727201b8e30dd42cbb53d15e03571c3bcbb43b79 /compiler/stgSyn | |
parent | af7cc9953217d74e88d4d21512e957edd8e97ec9 (diff) | |
download | haskell-58470fb7b4a25c49b567e08740dc8df01a6c3710.tar.gz |
Make a start towards eta-rules and injective families
* Make Any into a type family (which it should always have been)
This is to support the future introduction of eta rules for
product types (see email on ghc-users title "PolyKind issue"
early Sept 2012)
* Add the *internal* data type support for
(a) closed type families [so that you can't give
type instance for 'Any']
(b) injective type families [because Any is really
injective]
This amounts to two boolean flags on the SynFamilyTyCon
constructor of TyCon.SynTyConRhs.
There is some knock-on effect, but all of a routine nature.
It remains to offer source syntax for either closed or
injective families.
Diffstat (limited to 'compiler/stgSyn')
-rw-r--r-- | compiler/stgSyn/CoreToStg.lhs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/stgSyn/CoreToStg.lhs b/compiler/stgSyn/CoreToStg.lhs index eed579eed7..6c315b36f0 100644 --- a/compiler/stgSyn/CoreToStg.lhs +++ b/compiler/stgSyn/CoreToStg.lhs @@ -476,8 +476,7 @@ mkStgAltType bndr alts = case repType (idType bndr) of where _is_poly_alt_tycon tc = isFunTyCon tc - || isPrimTyCon tc -- "Any" is lifted but primitive - || isFamilyTyCon tc -- Type family; e.g. arising from strict + || isFamilyTyCon tc -- Type family; e.g. Any, or arising from strict -- function application where argument has a -- type-family type |