The easiest way to get started is to get Cabal to generate a .cabal
file for you, which you can use as a starting point. To do this, go to the project directory and enter
$ cabal init
He will then ask you a bunch of questions about your package. Some questions, such as the authorβs name and email address, really matter if you plan to upload your package to Hackage so you can leave them blank if you want. After that, you can edit the .cabal
file to configure it. The generated file will contain a bunch of comments that should help you get started. After that just enter
$ cabal configure $ cabal build
By default, the binary will be placed in ./dist/build/<name>/
.
source share