Proposals for changes to searching behaviour
Mon, 09 Dec 2002 11:16:18 -0500
> Since the problem is often that your program/library has a managable
> depth, but it is _located_ very deep in the hierarchy (eg. User.*
> modules if you have a long and complicated domain), then how about
> allowing A.B/C.hs for module A.B.C? Then you don't need to have a
> long, mostly empty dummy hierarchy.
Simon M. and I thought about that, but felt that it was unnecessarily
complicated since it would lead to the number of possible file names for a
module growing exponentially with the number components in the module name.
It would probably be possible to devise a recursive search algorithm
to deal with this, but that would be significantly more complicated than
what GHC currently does, and, worse, users would also have to be aware
of the exact algorithm used.
Probably not worth it.
But note, that with the suggested approach, you can flatten the hierarchy
as much or as little as you like, and you can call the top-level directory
whatever you like, including "A.B", since the compiler does not care about
Department of Computer Science