Make a start towards eta-rules and injective families
authorSimon Peyton Jones <simonpj@microsoft.com>
Mon, 17 Sep 2012 10:54:20 +0000 (11:54 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Tue, 18 Sep 2012 16:30:15 +0000 (17:30 +0100)
commit58470fb7b4a25c49b567e08740dc8df01a6c3710
tree727201b8e30dd42cbb53d15e03571c3bcbb43b79
parentaf7cc9953217d74e88d4d21512e957edd8e97ec9
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.
16 files changed:
compiler/iface/BinIface.hs
compiler/iface/BuildTyCl.lhs
compiler/iface/IfaceSyn.lhs
compiler/iface/MkIface.lhs
compiler/iface/TcIface.lhs
compiler/main/GHC.hs
compiler/main/PprTyThing.hs
compiler/prelude/TysPrim.lhs
compiler/stgSyn/CoreToStg.lhs
compiler/typecheck/TcInstDcls.lhs
compiler/typecheck/TcRnDriver.lhs
compiler/typecheck/TcSplice.lhs
compiler/typecheck/TcTyClsDecls.lhs
compiler/typecheck/TcTyDecls.lhs
compiler/typecheck/TcType.lhs
compiler/types/TyCon.lhs