16

Is it possible to (ab)use Cabal to have it create a generic Haskell project with a simple command, similar to what you can do in the Scala world with Sbt or Maven?

e.g.

> cabal create AwesomeProject
> ls
AwesomeProject.hs     awesomeProject.cabal     LICENSE     README     Setup.hs 

or is there another tool for that?

Alexander Battisti
  • 2,178
  • 2
  • 19
  • 24

1 Answers1

28

Use cabal init --interactive to have an interactive session with cabal. I've pasted the first few questions when using the command:

arash@arash-ThinkPad-SL510:~/test$ cabal init
Package name [default "test"]? 
Package version [default "0.1"]? 
Please choose a license:
   1) GPL
   2) GPL-2
   3) GPL-3
   4) LGPL
   5) LGPL-2.1
   6) LGPL-3
 * 7) BSD3
   8) BSD4
   9) MIT
  10) PublicDomain
  11) AllRightsReserved
  12) OtherLicense
  13) Other (specify)
Your choice [default "BSD3"]? 
Author name? MyName 
Maintainer email? 

Hope this helps.

schuelermine
  • 1,958
  • 2
  • 17
  • 31
Tarrasch
  • 10,199
  • 6
  • 41
  • 57