[Haskell-beginners] hierarchy of modules

Steven Cummings estebistec at gmail.com
Sat Oct 31 12:51:29 EDT 2009


What if he wanted to separately have test code? e.g. Sources and Tests each
containing identical hierarchies described above. I know cabal has an option
for source directory. It appears something  like [1] can be use to run all
tests, though I haven't yet looked into the details of how each file needs
to be structured so that all tests are detected (if, e.g., your using
quickcheck to implement your tests). Ideally, from the root directory I
would want to be able to do cabal install or cabal test.

[1] http://hackage.haskell.org/package/cabal-test

--
Steven


On Sat, Oct 31, 2009 at 7:54 AM, Daniel Fischer <daniel.is.fischer at web.de>wrote:

> Am Samstag 31 Oktober 2009 13:32:51 schrieb Michael Mossey:
> > I want to have a hierarchy of modules for a local project. Not submitting
> > it to Hackage yet. I just want to refer to my local modules as
> >
> > Basics.CSound
> > Basics.Node
> > Algo.Fux
> >
> > etc.
> >
> > how does one set this up?
>
> Top directory: project.cabal, Setup.hs (module Main where main =
> defaultMain)
> Subdirectry Basics:
>   File CSound.hs  (module Basics.CSound (exports) where...)
>   File Node.hs      (module Basics.Node (exports where...)
> Subdirectory Algo:
>   File Fux.hs       (module Algo.Fux (exports) where...)
>
> cd Top directory
> cabal install
>
> >
> > Thanks,
> > Mike
>
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20091031/3f31796e/attachment.html


More information about the Beginners mailing list