Show Menu
Cheatography

Cabal Cheat Sheet (DRAFT) by

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Simple Flow of Package Instal­lation

update database
cabal update
check the package name
cabal list package
install
cabal install -p --enab­le-­doc­ume­ntation package

Flow of Install

configure
cabal configure --enab­le-­doc­ume­ntation -p
build
cabal build
install
cabal install

Flow of Package Develo­pment

Initialize package
cabal init
check the rules
cabal check
configure for build
cabal configure --enab­le-­ben­chmarks -p
test build
cabal build
benchmark
cabal bench
 

Syntax of Header

name:
package name
version:
A.B.C.D
synopsis:
one-liner docume­ntation
despri­ption:
docume­ntation
license:
license name
author:
your name and address
category:
genre
build-­type:
Simple or
cabal-­ver­sion:
>= 1.16

Syntax of Executable

executable
name
main-is:
the name of the file that contains main
buildable:
True | False
other-­mod­ules:
ghc-op­tions:
defaul­t-l­ang­uage:
Haskel­l2010
build-­dep­ends:
base ==4.6, and so on