-
Simon Peyton Jones authored
--------------------------------------- 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.
3721dd37