[project @ 2004-01-05 12:11:42 by simonpj]
authorsimonpj <unknown>
Mon, 5 Jan 2004 12:11:44 +0000 (12:11 +0000)
committersimonpj <unknown>
Mon, 5 Jan 2004 12:11:44 +0000 (12:11 +0000)
commit3721dd37a707d2aacb5cac814410a78096e28a2c
treea4f4b2bf1de00bc2b5068d971e4d969a5164eb62
parente802f7a7f88d9cc71472f8296f9e2d72e4f82b13
[project @ 2004-01-05 12:11:42 by simonpj]
---------------------------------------
  Don't expose constructors as vigorously
  ---------------------------------------

GHC used to expose the constructors of a data type in the interface file,
even if (a) we were not optimising, and (b) the constructors are not exported.

In practice this isn't really necessary, and it's bad because it forces too
much recompilation.  I've been meaning to fix this for some while.

Now the data cons are hidden, even in the interface file, if both (a) and (b)
are true.  That means less interface file wobbling.

Mind you, the interface file still changes, because the to/from functions for
generic type classes change their types.  But provided you don't use them, you'll
get "compilation not required".

We could play the same game for classes (by hiding their class ops) but that'd
mean we'd have to change the data type for IfaceClassDecl, and I can't be
bothered to do that today.  It's unusual to have a class which exports none
of its methods anyway.

On the way, I changed the representation of tcg_exports and mg_exports (from
Avails to NameSet), but that should be externally invisible.
ghc/compiler/deSugar/Desugar.lhs
ghc/compiler/iface/IfaceSyn.lhs
ghc/compiler/iface/MkIface.lhs
ghc/compiler/main/HscTypes.lhs
ghc/compiler/rename/RnNames.lhs
ghc/compiler/typecheck/TcRnDriver.lhs
ghc/compiler/typecheck/TcRnMonad.lhs
ghc/compiler/typecheck/TcRnTypes.lhs