GHC source code improvement ideas

Isaac Dupree isaacdupree at
Fri Jan 4 07:17:23 EST 2008

Simon Peyton-Jones wrote:
> |   4. A more radical change would be introducing hierarchical modules. This
> | could be just a matter of renaming the directories to start with an upper
> | case character and changing the import declarations. This gives module names
> | like "Typecheck.TcGadt". The tc is redundant here, so perhaps it should be
> | renamed to "Typecheck.Gadt" or "Typecheck.GADT". Perhaps even better would
> | be "GHC.Typecheck.GADT", this way some modules can be exposed as part of the
> | GHC api.
> I don't think I'd object, but I'm not sure that much is gained here.  We don't
 > spend much time on mondule-name clashes.

I vote for this, as it makes it easier to progress to standard 
module-chasing such as Cabal or `ghc --make`, and everyone supports 
hierarchical modules nowadays. (I might do it myself, if appropriate)

warning: calling them "GHC.*" clashes with base's use of that namespace 
for implementation-specific functions in compiled programs, INCLUDING 
ghc (I mean, GHC code sometimes says "import GHC.Exts") ... so let's 
please find a different name-prefix if we decide we want one.


More information about the Glasgow-haskell-users mailing list