[Haskell-cafe] Starting your own Haskell project: part 2
Donald Bruce Stewart
dons at cse.unsw.edu.au
Sun Nov 19 07:54:03 EST 2006
> On 11/19/06, Dougal Stanton <ithika at gmail.com> wrote:
> >Quoth Donald Bruce Stewart, nevermore,
> >> P.S. It might even be useful to have a tool, haskell-project, which
> >> sets up all these files automatically.
> >I was wondering about that just the other day. Is there such an
> >application to interrogate the user about particulars and then create a
> >fully compliant *.cabal file?
> I'm unaware of such a tool, but as far as UIs go, it should be fairly
darcs get http://www.cse.unsw.edu.au/~dons/code/mkcabal
mkcabal creates a new project directory for an executable, populates
with cabal files, setup.hs and a stub .hs file, based on the project
Project name: haq
Created new project directory: haq
$ cd haq
Haq.hs Setup.hs haq.cabal
$ cat Haq.hs
main :: IO ()
main = putStrLn "Hello, world!"
$ cat Setup.hs
$ cat haq.cabal
Description: Project description
Author: Author Name
Maintainer: user at email.address
Preprocessing executables for haq-0.0...
[1 of 1] Compiling Main ( Haq.hs, /usr/obj/cabal/haq/haq-tmp/Main.o )
Linking /usr/obj/cabal/haq/haq ...
And we're in business.
We could be smarter and figure out more defaults, and generate some stub
quickcheck and haddock details. We could also init and create the
project in a darcs directory.
Comments, suggestions *and patches* welcome!
More information about the Haskell-Cafe