Should NameSpace be abstract?
Projects outside of GHC, like hiedb and HLS, sometimes find it necessary to serialise GHC Names and OccNames independently of mechanism in GHC itself. For this, it is necessary to be able to construct and inspect the NameSpace
component. Currently they do this in an ad-hoc manner using the isVarNameSpace
, isDataNameSpace
... family of functions. It would be helpful if we could just pattern match on the constructors.
I don't quite understand what we gain from making NameSpace
and abstract type. I propse that we export its constructors to allow tooling developers to inspect and construct NameSpace
s freely.