[Haskell-cafe] stack, git, directory structure
magnus at therning.org
Sun May 28 21:22:33 UTC 2017
Dennis Raddle <dennis.raddle at gmail.com> writes:
> I have a few basic questions about my project organization using stack.
> I'm going to have several executables and a hierarchical library.
> For instance, let's say I'm going to call my overall system "cac" (computer
> aided composition). I'll have imports like
> import Cac.Util
> import Cac.Search
> import Cac.Search.Algo1
> -- some modules that assist things
> import XDoc
> import XDoc.Parse
> and so on.
> I'll have executables named 'foo', 'bar', etc.
> So would the following be correct?
> - call the directory where I put all stack packages $PROJ
> - call the top level of my specific project $PROJ/cac, which will have
> - I'll have the following files and dirs:
> - modules:
> - $PROJ/cac/src/Cac.hs
> - $PROJ/cac/src/Cac/
> - $PROJ/cac/src/Cac/Util.hs
> - $PROJ/cac/src/Cac/Search.hs
> - $PROJ/cac/src/Cac/Search/
> - $PROJ/cac/src/XDoc.hs
> - $PROJ/cac/src/XDoc/
> - $PROJ/cac/src/XDoc/Parse.hs
> - executables:
> - $PROJ/app/foo.hs
> - $PROJ/app/bar.hs
> Also, if I'm going to use git, would my .git/ directory be at
> $PROJ/cac/.git/ ?
Depending a little on how tightly coupled lib and exes are I'd either
put all into a single Cabal file:
Or lib and exes in separate folders:
Or maybe even each exe into its own folder.
Magnus Therning OpenPGP: 0x927912051716CE39
email: magnus at therning.org jabber: magnus at therning.org
twitter: magthe http://therning.org/magnus
Computer Science: "In low-level languages like C"
Computer Engineering: "In high-level languages like C"
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 832 bytes
Desc: not available
More information about the Haskell-Cafe