patch applied (ghc-fc2): Import/export of data constructors in
family instances
chak at cse.unsw.edu.au
chak at cse.unsw.edu.au
Tue Sep 12 14:02:31 EDT 2006
Tue Sep 12 10:54:37 PDT 2006 Manuel M T Chakravarty <chak at 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! ***
M ./compiler/iface/BinIface.hs -3 +12
M ./compiler/iface/IfaceSyn.lhs -11 +24
M ./compiler/iface/LoadIface.lhs -6 +15
M ./compiler/iface/MkIface.lhs -20 +28
M ./compiler/iface/TcIface.lhs -6 +12
M ./compiler/main/HscMain.lhs -5 +7
M ./compiler/main/HscTypes.lhs -28 +50
M ./compiler/main/TidyPgm.lhs -5 +10
M ./compiler/rename/RnEnv.lhs -1 +23
M ./compiler/rename/RnNames.lhs -6 +11
M ./compiler/typecheck/TcRnDriver.lhs -2 +3
A ./compiler/types/FamInstEnv.lhs
More information about the Cvs-ghc
mailing list