This is a draft cheat sheet. It is a work in progress and is not finished yet.
Simple Flow of Package Installation
update database |
cabal update |
check the package name |
cabal list package |
install |
cabal install -p --enable-documentation package |
Flow of Install
configure |
cabal configure --enable-documentation -p |
build |
cabal build |
install |
cabal install |
Flow of Package Development
Initialize package |
cabal init |
check the rules |
cabal check |
configure for build |
cabal configure --enable-benchmarks -p |
test build |
cabal build |
benchmark |
cabal bench |
|
|
Syntax of Header
name: |
package name |
version: |
A.B.C.D |
synopsis: |
one-liner documentation |
despription: |
documentation |
license: |
license name |
author: |
your name and address |
category: |
genre |
build-type: |
Simple or |
cabal-version: |
>= 1.16 |
Syntax of Executable
executable |
name |
main-is: |
the name of the file that contains main |
buildable: |
True | False |
other-modules: |
ghc-options: |
default-language: |
Haskell2010 |
build-depends: |
base ==4.6, and so on |
|
|
|