Import/export of data constructors in family instances
authorManuel M T Chakravarty <chak@cse.unsw.edu.au>
Wed, 20 Sep 2006 18:49:53 +0000 (18:49 +0000)
committerManuel M T Chakravarty <chak@cse.unsw.edu.au>
Wed, 20 Sep 2006 18:49:53 +0000 (18:49 +0000)
commita835e9faf19400aa6b7999b6f64e60cb1c7737dd
treeeba11e1b7d808035effac03b66088d515ef5565b
parent24bb49b71bce13faa263386e68d49fc0b05557b7
Import/export of data constructors in family instances
Mon Sep 18 19:50:42 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
  * Import/export of data constructors in family instances
  Tue Sep 12 13:54:37 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
    * Import/export of data constructors in family instances
    - Data constructors of a data/newtype family F can be exported and imported
      by writing F(..) or F(ConName).
    - This appears the most natural from a user's persepctive - although, it has a
      slightly different flavour than similar import/exports items for closed data
      types.  The data constructors denoted by F(..) vary in dependence on the
      visible data instances.
    - This has been non-trivial to achieve as RnNames derives its knowledge of what
      sub-binders an F(..) item exports/imports from the relation specified by
      Name.nameParent - ie, the constructors of a data/newtype instance need to
      have the family name (not the internal name of the representation tycon) as
      their parent.

    *** WARNING: This patched changes the iface format! ***
    ***          Please re-compile from scratch!     ***
compiler/iface/BinIface.hs
compiler/iface/IfaceSyn.lhs
compiler/iface/LoadIface.lhs
compiler/iface/MkIface.lhs
compiler/iface/TcIface.lhs
compiler/main/HscMain.lhs
compiler/main/HscTypes.lhs
compiler/main/TidyPgm.lhs
compiler/rename/RnEnv.lhs
compiler/rename/RnNames.lhs
compiler/typecheck/TcRnDriver.lhs