[Haskell-beginners] Module structure

Colin Paul Adams colin at colina.demon.co.uk
Fri Feb 27 12:39:26 EST 2009

>>>>> "Chaddaï" == Chaddaï Fouché <chaddai.fouche at gmail.com> writes:

    Chaddaï> On Fri, Feb 27, 2009 at 5:36 PM, Colin Paul Adams
    Chaddaï> <colin at colina.demon.co.uk> wrote:
    >> If I want to write part of the code for my program as a
    >> library, and so put those modules into a hierarchical module
    >> structure (with the non-library code in no module), do I have
    >> to structure the directories in a special way to get the module
    >> search to work?

    Chaddaï> Yes, module My.Pretty.Little.Module must be in file
    Chaddaï> "My/Pretty/Little/Module.hs" in one of the root
    Chaddaï> directories (which can be specified on the command line
    Chaddaï> to ghc, or in the .cabal file if you use an unusual
    Chaddaï> directory structure).  Note that this only apply before
    Chaddaï> compiling, the executable is independent.

Thank you.
Where do I find out what the root directories are? Is mt project
directory one of them?
Colin Adams
Preston Lancashire

More information about the Beginners mailing list