[Haskell-beginners] hierarchy of modules

Daniel Fischer daniel.is.fischer at web.de
Sat Oct 31 14:43:20 EDT 2009


Am Samstag 31 Oktober 2009 18:19:24 schrieb Michael Mossey:
> Hi Daniel,
>
> Thanks for the information. However, does this work for a
> test-compile-debug cycle, or for a modify-interpret cycle? These modules
> would all be in development. I don't like the idea that I have to 'cabal
> install' after any change to any module. Is that necessary?

No, that would be the step when develpment is done (for the time being).
While developing, have the same source-tree (you can add the .cabal file and Setup.hs 
later) and just work in ghci (compile what's not currently being worked on, so the code 
runs faster).

I can't guarantee that it works everywhere and with all versions of GHC, but it works 
here.

>
> Thanks,
> Mike
>
> Daniel Fischer 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




More information about the Beginners mailing list