infrastructure.tex 2011-11-17 haskell doc September 6, 2012 1

1 The standard Haskell infrastructure [infrastructure.tex 2011-11-17]

Announcement Forword I shouldn’t say, that the Haskell is a mess. Maybe, it is a Haskell amateurs write Haskell modules, Haskell professionals good design and the cabal command is already a powerful and write packages. versatile tool. But its documentation is still a mess: all the good Modules are part of the Haskell language in the narrower sense Haskell books out there either don’t deal with packages at all, of a well–defined syntax and pretty well–explained semantics. or they sketch typical examples without explaining a lot. And Packages are defined by a standard beyond, namely the Ca- the Cabal User Guide itself is rather an overwhelming reference bal, the Common Architecture for Building Applications and Li- than a tutorial. braries. I should understand the matter to write this text. But I wrote In the sequel, we try to shed some light on the standard Haskell it, because I don’t. And nothing out there fills the void, so far. infrastructure. So please, don’t be polite, but criticize. Especially, if you find it (1) The is the common ground for all Haskellers useful. and we give a summarizing overview of its ingredients.

(2) Cabal *** CONTINUE HERE *** libraries.tex 2009-02-14, 2011-10-27 haskell doc September 6, 2012 2

The Standard Haskell Environment Each of the mentioned applications comes with a built–in man- ual, which shows when you add --help to the commands name. The Haskell Platform 3 1 The comprehensive GHC Users’s Guide is available online , but In 2009, the Haskell Platform was introduced as the default also comes as part of the Haskell Platform. “comprehensive, robust developmnet environment for program- ming in Haskell”. If you consider working with Haskell, this is imperative. It is available for all main stream operating systems Different units of Haskell and really easy to install. It is important to understand the following concepts, which all It includes refer to units of Haskell code or software. (1) (1) The standard Haskell machine: namely the Glasgow Haskell Modules Compiler or GHC. A module is a well–formed unit of Haskell , with By “Haskell machine” we mean an interpreter or compiler, and an own name (say Example) and stored in a separate file of the in fact, GHC comes with both. same name (i.e. Example.hs or Example.lhs). This concept is In the past, there was a tendency to clearly distinguish the part of the Haskell language and its general form is Haskell language (at that time, the standard was Haskell 98) from the Haskell machines. There exist about a dozen dif- module Example {- optional list/tuple of exports -} where ferent implementations.2 But most of them don’t implement {- imported modules -} the complete current standard of Haskell 2010 and the with {- data type and function definitions -} the introduction of the Haskell Platform, the emphasis is com- pletely turned and GHC has become the standard. The definitions of given modules can be made available in new (2) A couple of developer tools, in particular: module (with say “import Example”), or it can be loaded into ( ) Cabal, an acronym for Common Architecture for Building a Haskell interpreter (like ghci or hugs, by calling the :load Applications and Libraries. In particular, it comes with Example) command. the cabal executable, which is the new universal tool to (2) Libraries work with packages: downloading and installing new pack- A library is a collection of interconnected modules. Often, ages (from HackageDB), but also creating, modifying and there is a kind of principal module in a library, which imports documenting packages can be done with this command. Un- the other modules and exports the (most important) defini- derstanding all that is the main issue of our text below. tions again. And then the functionality of the whole library ( ) , a document generator, can be loaded or imported by just loading this principal mod- and a couple of other tools for parsing, profiling, debugging ule. In fact, there is often no clear distinction between the and statistics, which are beyond our text here. terms “library” and “module” in the documentations. (3) Applications/Programs/Executables (3) Documentation. An application, also known as program or executable, refers to a Haskell unit that can be run as a standalone command GHC — the from the command line of the . The Glasgow Haskell Compiler is the default Haskell implemen- In terms of Haskell, this is an action or function of type IO (), tation and is part of the Haskell platform. In fact, the title always called main, embedded into a module called Main and “compiler” is an understatement, because it can compile as well compiled into an executable program of an arbitrary name, as interpret Haskell code (with subtle mixtures of both). say halloworld. This can then be run by calling halloworld Its two most important applications are: from the shell or command line (possibly with additional ar- guments). (1) ghc the compiler, which converts source code into fast pro- (4) Package grams. A package is a collection of modules, applications and related (2) ghci the interpreter, but the “i” can also be read as “in- files like documents etc. The package concept is not part of teractive”. It opens the REPL (Read-Eval-Print Loop) envi- the Haskell language in the narrower sense of Haskell 2010, ronment, where your input is immediately evaluated. That is but is part of a wider standard called Cabal, the Common what one thing that make developing in functional languages Architecture for Building Applications and Libraries4. so fast and comfortable. As a Haskell amateur, you write and use Haskell modules or If you installed the Haskell platform on Windows, you will also libraries and compile them into applications. To explore and have exploit the power and beauty of functional programming in gen- eral and Haskell in particular, you can live a long and happy (2)(a) WinGHCi , a nice and supportive GUI version of the ghci, that more than compensates for the poor standard command life without getting in touch with the package concept. But as a terminal in Windows. serious Haskell programmer, if you want to share your code with others, you write Cabal packages and you need to understand Two other available and useful applications are: some new standards.

(3) ghc-pkg is a powerful package management tool for the GHC, that comes with a whole range of subcommands for all sorts of tasks. With the new emphasis on the Cabal standard for Haskell package management independent of Haskell im- plementations (see below), you will normally rather call the cabal command, instead, which often runs ghc-pkg behind the scenes. (4) runghc allows to run a Haskell program without compiling it first. This may occasionally be convenient for your own pro- gram development. This command, too, has an implementation–independent couterpart called runhaskell , and that comes with the Haskell Platform, as well. But in fact, it is just an alias for runghc.

1 http://hackage.haskell.org/platform/ 2 See http://haskell.org/haskellwiki/implementations for an overview of the current Haskell machines 3 The latest version of the GHC Users’s Guide is available at http://www.haskell.org/ghc/docs/latest/html/users guide/ 4 http://haskell.org/cabal/ libraries.tex 2009-02-14, 2011-10-27 haskell doc September 6, 2012 3

\newpage in its menu to pop up the Platform documentation.) Cabal and the Haskell Platform distinguish two main places for The Haskell Hierarchical Libraries the whole installation: 5 There is a standard hierarchy of important libraries: global refers to the system–wide part of the implementation. 6 (1) The Standard Prelude is the core of the whole Haskell On Windows, this is a directory like C:\Programs\Haskell language in the sense that it defines all primitive types and Platform. GNU/Linux uses various directories, depending on functions. All these are summarized in the Prelude 7 mod- the distribution. ule/library. When you start a Haskell interpreter like ghci, user denotes the local and user–specific parts. On GNU/Linux, the Prelude comprises the set of data structures and functions this is always the .cabal directory at /home/myself/.cabal which are available. On Windows, this is the cabal directory at something 8 like C:\Documents and Settings\myself\User data\cabal (In (2) The Haskell 2010 language report is the official definition of Haskell in the narrower sense as the syntax and semantics of a GHCi session you can query this directory by calling System.Directory.getAppUserDataDirectory "cabal" a formal language and the least set of features common to all ). real Haskell implementations. Haskell 2010 is the successor of The Haskell Platform itself is most likely installed globally. But 9 the Haskell 98 Language. if you install additional packages from Hackage (see below) with 10 Next to the Prelude, it includes a couple of other libraries the cabal command, then this is only done for the current user for important data structures (Array, Bits, Char, Complex, Int, by default, although it can easily be done globally as well (by Ix, List, Maybe, Ratio, Numeric), system and control libraries adding the --global flag). (Monad, System) and interfaces with other programming lanu- ages (Foreigh), C in particular. The setup of the whole layout is summarized in the config file 11 (3) The Base library contains additional tools that are es- that resides in the .cabal directory (or cabal on Windows). It sential for Haskell implementations itself to run Haskell in contains two lists called install-dirs global and install-dirs Haskell, such as tools for parsing, debugging and control. user where the locations of various file groups are listed. 12 (4) The GHC stardard libraries is the collection of all mod- 16 ules the come with the GHC. This is a superset of all previ- Synchronic vs. diachronic programming in Haskell ous libraries with many new modules not available in other Each programming language, which is more than a toy and has a implementations. Besides, the GHC exceeds the Haskell real user community, faces the same dilemma: although it is de- 2010 standard in many ways, both the formal language it- signed as an ideal and timeless language, it does change through self (e.g. multi–parameter type classes), and its libraries (e.g. history. Every main stream language nowadays has different ver- ByteString, Set etc.). sions. And these versions are more or less incompatible. 13 (5) The Haskell Platform libraries finally is yet an even big- The same phenomenon holds for Haskell, as well. But here, the ger set. Next to some language extensions (e.g parallel), its progress is more complicated than the version number systems main intention is to provide Cabal for easy package down- of other languages like Perl or JavaScript. On a broader view of load an installation and machine–independent development, Haskell as a well–defined formal language, the steps are very con- together with a series of other important development tools servative: the last improvement was from 98 to 2010 and Haskell for parsing, testing, debugging, profiling and documentation. Prime is in the making, without a lot of pressure or hurry. The title “hierarchy” can be understood in two ways here. First, The GHC is making progress more frequently, e.g. four updates as the mentioned inclusion: in 2011 alone so far (from 7.0.2 to 7.2.2). But the version system of this de facto standard implementation is unrelated to the offi- ... Prelude ⊂ Haskell 2010 ⊂ ⊂ Haskell Platform libraries cial version system of Haskell. Neither is Haskells version system is part of the formal language in the narrower sense, instead it Secondly, there is also a kind of top–down tree structure. There is defined as part of the package concept, formalized by Cabal. are not only “top–level modules” such as List, Random or Time, Suppose, I write a library that makes use of other libraries from but also “sub–modules” such as Data.ByteString or Network.URI, Hackage. When these libraries are replaced by newer versions, it “sub–sub–modules” such as Network.CGI.Cookie etc. This hier- might happen that my own library doesn’t work properly, any- archy actually reflects a hierarchy of directories and files: the more. Therefore, all the libraries on Hackage have version num- module Foo is also a Haskell file (Foo.hs or Foo.lhs), First/Foo is bers. In fact, in a first approach to the package concept, we could a module Foo in the First directory, First/Second/Foo is a module say that Foo in the Second directory, which is a subdirectory of First, etc. The top–level directories (Control, Data, Distribution, Foreign, Package (identifier) := Library (name) + version (number) Network etc.) are also called categories, related to the categories on HackageDB online repository.14 This is one principal difference between “amateur” or synchronic programming in Haskell and “professsional” or diachronic pro- gramming: modules are synchronic, packages are diachronic: The layout of the Haskell Platform on your system

Haskell in general and the Haskell Platform in particular is designed to (i) When I load a module/library, say Ratio for rational number abstracts from the actual system it runs on. You shouldn’t be obliged to arithmetic, I call :module in a GHCi session know where all the files of the Haskell Platform itself reside on your sys- tem. :module Ratio However, this principle not always consequently implemented, yet. Al- And when I import it into another module, I do that with though the whole Platform is supposed to be delivered with the documen- tation included, there is no standard way to refer to (the index of) the import Ratio Haddock–generated HTML files, the local equivalent to the online version There is no need and no way to specify the version, it auto- of the Haskell Platform Libraries documentation.15 (An exception is the matically refers to the latest one. Windows version with the nice WinGHCi, where you simply hit the “?” button (ii) When I write a package, however, I have to attach a pack- 5 http://haskell.org/haskellwiki/Applications and libraries 6 http://haskell.org/onlinereport/standard-prelude.html 7 http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html 8 http://haskell.org/haskellwiki/Language and library specification 9 http://haskell.org/onlinereport 10 http://www.haskell.org/onlinereport/haskell2010/haskellpa2.html 11 http://hackage.haskell.org/package/base-4.1.0.0 12 http://www.haskell.org/ghc/docs/latest/html/libraries/index.html 13 http://lambda.haskell.org/hp-tmp/docs/2011.2.0.0/index.html 14 http://hackage.haskell.org 15 http://lambda.haskell.org/hp-tmp/docs/2011.2.0.0/index.html libraries.tex 2009-02-14, 2011-10-27 haskell doc September 6, 2012 4

age description to the library, in which I specify the range of The whole Common Architecture for Building Applications and versions of each imported module, e.g. like so Libraries is probably not the most beautiful and elegant part of the whole Haskell adventure. But however, in its current state, Library it is able to hide all that from an ordinary Hackage user. The Build-depends: download and installation of the library and applications con- base >= 2, -- base package up to version 2 tained in a package, together with optional documentations and foo >= 1.2 && < 1.7, -- foo package version 1.2 to 1.7 test procedures, all that can be achieved with one simple bar == 1.2.* -- bar package all 1.2 (sub)versions cabal install ... If my package is built on outdated packages, e.g. if foo-2.0 is the latest foo package, Cabal is able to supply the required Example installation from Hackage with cabal older version and thus provides stability through time. One of my favorite programs is Pandoc18, a very versatile and In fact, the total of the Haskell Platform Libraries, which universal converter between document formats. To download presents itself as a synchronic hierarchy of modules, is also and install the package from Hackage, a simple installed as a collection of packages behind the scenes. The cabal install pandoc overview of the Haskell Platform, see suffices. To make sure that the local list of available packages is http://lambda.haskell.org/hp-tmp/docs/2011.2.0.0/index.html up to date, a call of cabal update shows the module hierachy on the left, and on the right hand side, it lists the package (e.g. haskell98-1.1.0.1, zlib-0.5.3.1, prior to the cabal install is generally recommended as a good mtl-2.0.1.0 etc.) that contains the according module. habit. After completion, the Text.Pandoc library is available, and so is the pandoc command from the command line.19 As a simple Listing the implemented packages test, Calling the list (sub)command of the GHC’s package manage- pandoc -v ment tool prints out some version information and thus confirms the suc- ghc-pkg list cessful package installation. Note, that the full package identifier also has a version number, say pandoc-1.8.2.1, but the version is returns the list of packages which are installed 1. globally and not required in a cabal install call. The latest version is always 2. user-locally. taken by default. On my machine, the response looks like this: Also by default, cabal install implements a package for the cur- /var/lib/ghc-7.0.3/package.conf.d rent user only. For a global installation, there is the --global Cabal-1.10.1.0 flag, so GLUT-2.1.2.1 HTTP-4000.1.1 cabal install --global pandoc HUnit-1.2.2.3 You can also simulate a possible installation without actually . . installing anything, by a call of . /home/bucephalus/.ghc/i386-linux-7.0.3/package.conf.d cabal install --dry-run pandoc base64-bytestring-0.1.0.3 Pandoc is also a nice example of an application, written in binary-0.5.0.2 Haskell, that can be installed and applied without having to . . know any Haskell or Cabal at all. In this respect, Haskell in the . broader sense of its whole infrastructure, has become an adult programming language, suitable for serious work. There are two package databases, one global and one user– specific, both called package.conf.d (or package.conf in older GHC implementations) that hold the information. Implementing a package also means registering the package with one of these databases. There is also a list (sub)command for the cabal tool. But the call of cabal list tells something completely different: namely it lists the main package information of all the packages stored in the on- line HackageDB. By the way, this list is not drawn from http://hackage.haskell.org, but the cached version on your ma- chine. This version needs to be updated explicitly with cabal update

The HackageDB and the installation of additional packages

The Haskell Platform libraries provide a useful set of universal data structures and functions. Additional additional solutions for all kinds of problems and needs are available from Hack- ageDB, the central onlin repository of Haskell packages for easy download and installation, at http://hackage.haskell.org And the cabal command17 that comes with the Haskell Plat- form, provides an easy method to install them.

17 The cabal executable is referred to as cabal-install. See http://hackage.haskell.org/trac/hackage/wiki/CabalInstall and http://haskell.org/haskellwiki/Cabal-Install 18 http://hackage.haskell.org/package/pandoc 19 http://johnmacfarlane.net/pandoc libraries.tex 2009-02-14, 2011-10-27 haskell doc September 6, 2012 5

\newpage haskell/runghci ***

Case study: building an assistant for project The Doit assistant development module Doit where sourceRoot :: FilePath Introduction edit :: IO () Suppose, you work on the implementation of a project in Haskell tarball :: IO () and say it is called “My Precious”. haddock :: IO () test :: IO () In the simplest case, you write a single file MyPrecious.hs (or MyPrecious.lhs) *** CONTINUE HERE *** *** later on: add a main function that allows edit, tarball etc. as parameters; next ver- Recall: compiling and calling sion: a DoitGenerator *** *** Load, compile, run, main from ghci, run- cabal.tex 2009-11-27 haskell doc September 6, 2012 6

2 Cabal — the Common Architecture for Building Applications and

Libraries [cabal.tex 2009-11-27]

2.1 Introduction Cabal and cabal Cabal, the acronym for Common Architecture for Building Ap- plications and Libraries, defines the concept of a package and rules and tools to built, distribute and install these packages. cabal is a command, which is installed as part of the Haskell Platform. It is a tool for the creation and management of pack- ages. The official name of this application is cabal-install, but we rather avoid this term and usually talk about “the cabal com- mand”.

Package A package is a combination of modules, applications and pos- sible other files to a well–defined unit, which is given and dis- tributed as a tarball, i.e. single zipped archive file of the form name-version.tar.gz. Each package has a unique identifier of the form package identifier = package name - version number For example, bytestring-0.9.1.10 is a package identifier and a combination of the package name bytestring and the version number 0.9.1.10.

Hackage Hackage or the HackageDB is the central online repository for Haskell packages at http://hackage.haskell.org *** CONTINUE HERE ***

The organization of the Haskell Platform Although the Haskell Platform Libraries are presented to the user as a hierarchy of modules, it is in fact organized and im- plemented as a collection of packages. Actually, it is two kinds of package collections, because there is the global list of pack- ages for all users, and then there is the user–specific package collection, which exists for each user separately. cabal.tex 2009-11-27 haskell doc September 6, 2012 7

\newpage Working with cabal Packages *** define package and description *** Information about installed and available packages

System and User *** CONTINUE HERE *** ghc-pkg list *** CONTINUE HERE *** cabal list *** CONTINUE HERE *** cabal udpate *** CONTINUE HERE *** cabal info *** CONTINUE HERE *** Getting and installing packages *** CONTINUE HERE *** cabal install cabal fetch cabal unpack cabal configure cabal build cabal copy cabal register Building packages cabal init cabal sdist cabal upload cabal report cabal check Generating documents via cabal cabal haddock cabal hscolour Running tests via cabal cabal test Help cabal --help *** CONTINUE HERE *** cabal.tex 2009-11-27 haskell doc September 6, 2012 8

\newpage Extracting is done with the -x option and uncompressing uses -z again. So with *** CONTINUE HERE *** tar -zxf example.tar.gz

we recover the original f1,...,fN again in the current directory.

2.1.1 Introduction xxx Another useful options for the tar is -v for “verbose”, which pro- A Haskell package is a collection of modules, programs and other vides more information during the function call. things like documents. A package could be distributed as such, maybe as a tarball (see 2.2.1 cabal-tarball ). The receiving user of the package could then extract the tarball and load them from the cur- rent directory. But there is a better and more standardized way to distribute packages: the Haskell Cabal (Common Architecture for Building Applications and Libraries). 2.2.2 Installing cabal-install xxx The cabal-install command line interface is a separated piece of The Cabal is in fact one part of a larger community project called software and doesn’t come with say the GHC or other compil- Hackage20, which also has two other parts: ers automatically. Until recently, it needed to be installed sepa- 21 22 () A free and open online database called HackageDB , where de- rately itself . But in 2009, the Haskell Platform was published, velopers and users can easily interchange Haskell packages (sim- which is a suite of common Haskell–related programs, including ilar to the CPAN project for the Perl programming community). cabal-install, and a selection of important packages from Hack- 23 () An easy command line interface called cabal-install which in- ageDB. Installing that is probably a good and more efficient idea stalls packages directly from the HackageDB repository, uploads anyway. packages or checks for package dependencies etc. The naming is a bit confusing, because the command itself is not cabal-install, but simply cabal, and a call of cabal install p1 p2 ... pN

installs the requested packages p1,...,pN from HackageDB.

2.2 Preliminaries

2.2.1 Digression on tarballs and the tar command cabal-tarball Several files or directories can be merged into a single archive file and this can also be compressed to an even smaller file. These achiving and compressing tasks can all be done with the standard Unix/Linux tar command and the resulting file is often called a tarball. () Creating an archive file. The command tar -cf example.tar f1 f2 f3 ... fN

takes the files or directories f1,...,fN and merges them into the single file example.tar. The file extension “tar” stands for “tape archive” and refers to an ancient time where tapes were used for backup. The switches -c and -f in the previous command tar -cf stand for “create” and “use the designated file name”, respectively. () Compressing and uncompressing a file. A file could further be compressed with the gzip command into example.tar.gz, and with gunzip we could recover the original file again. But these steps can be combined with the tar com- mand via the -z switch, as follows. () Creating and compressing in one step. The command tar -cfz example.tar.gz f1 f2 f3 ... fN

takes the files or directories f1,...,fN and combines them into the compressed single file example.tar.gz. () Extracting tarballs.

20 The Hackage project is located at http://hackage.haskell.org. 21 HackageDB can be accessed via http://hackage.haskell.org as well. 22 See e.g. http://haskell.org/cabal/download.html and follow the instructions there. 23 The Haskell Platform can be downloaded from http://hackage.haskell.org/platform. cabal.tex 2009-11-27 haskell doc September 6, 2012 9

\newpage and the output is

Warning: The package list for ’hackage.haskell.org’ is 29 days old. Run ’cabal update’ to get the latest list of available packages. Resolving dependencies... Downloading json-0.4.3... Configuring json-0.4.3... Preprocessing library json-0.4.3... 2.3 Installing Haskell packages Building json-0.4.3... [1 of 7] Compiling Text.JSON.Types ( Text/JSON/Types.hs, dist/build/Text/JSON/Types.o ) [2 of 7] Compiling Text.JSON.String ( Text/JSON/String.hs, dist/build/Text/JSON/String.o )

Text/JSON/String.hs:127:4: Installing a package from HackageDB with cabal xxx Warning: Pattern match(es) are non-exhaustive 2.3.1 In a case alternative: Patterns not matched: [] [3 of 7] Compiling Text.JSON.ReadP ( Text/JSON/ReadP.hs, dist/build/Text/JSON/ReadP.o ) *** Update this with the pandoc example *** [4 of 7] Compiling Text.JSON.Pretty ( Text/JSON/Pretty.hs, dist/build/Text/JSON/Pretty.o ) For example, on the packages list of the HackageDB24 I found the [5 of 7] Compiling Text.JSON.Parsec ( Text/JSON/Parsec.hs, dist/build/Text/JSON/Parsec.o ) 25 [6 of 7] Compiling Text.JSON ( Text/JSON.hs, dist/build/Text/JSON.o ) json package . From the package discription there I can see that [7 of 7] Compiling Text.JSON.Generic ( Text/JSON/Generic.hs, dist/build/Text/JSON/Generic.o ) it comprises the following modules /usr/bin/ar: creating dist/build/libHSjson-0.4.3.a Installing library in /home/buc/.cabal/lib/json-0.4.3/ghc-6.10.4 Registering json-0.4.3... Text.JSON Reading package info from "dist/installed-pkg-config" ... done. Text.JSON.Generic Writing new package config file... done. Text.JSON.Parsec Text.JSON.Pretty Text.JSON.ReadP To use that e.g. in ghci I can do e.g. Text.JSON.String Prelude> :m + Text.JSON Text.JSON.Types Prelude Text.JSON> To make sure that my cabal version is up to date, I should first run

cabal update

To install the json package, I run 2.4 Creating a Haskell package cabal install json *** CONTINUE HERE ***

24 see http://hackage.haskell.org/packages/archive/pkg-list.html 25 see http://hackage.haskell.org/package/json cabal.tex 2009-11-27 haskell doc September 6, 2012 10

Figure 1: The cabal command

xxx

A call of cabal -h returns the following help: This program is the command line interface to the Haskell Cabal infrastructure. See http://www.haskell.org/cabal/ for more information.

Usage: cabal COMMAND [FLAGS] or: cabal [GLOBAL FLAGS]

Global flags: -h--help Showthishelptext -V --version Print version information --numeric-version Print just the version number

Commands: install Installs a list of packages. update Updates list of known packages list List packages matching a search string. info Display detailed information about a particular package. fetch Downloads packages for later installation. unpack Unpacks packages for user inspection. check Check the package for common mistakes sdist Generate a source distribution file (.tar.gz). upload Uploads source packages to Hackage report Upload build reports to a remote server. init Interactively create a .cabal file. configure Prepare to build the package. build Make this package ready for installation. copy Copy the files into the install locations. haddock Generate Haddock HTML documentation. clean Clean up after a build. hscolour Generate HsColour colourised code, in HTML format. register Register this package with the compiler. test Run the test suite, if any (configure with UserHooks). upgrade (command disabled, use install instead) help Help about commands

For more information about a command use: cabal COMMAND --help

To install Cabal packages from hackage use: cabal install foo [--dry-run]

Occasionally you need to update the list of available packages: cabal update

You can edit the cabal configuration file to set defaults: /home/bucephalus/.cabal/config cabal.tex 2009-11-27 haskell doc September 6, 2012 11

Figure 2: The package description cabal-descriptorFig a The package description file has the name “packageName.cabal” and is encoded using UTF-8. Lines whose first non–whitespace characters are “ -- ” are treated as comments and they are ignored. *** CONTINUE HERE *** *** CONTINUE HERE *** *** CONTINUE HERE *** *** CONTINUE HERE *** *** CONTINUE HERE *** *** CONTINUE HERE *** *** CONTINUE HERE *** *** CONTINUE HERE *** *** CONTINUE HERE *** *** CONTINUE HERE *** *** CONTINUE HERE *** *** CONTINUE HERE *** *** CONTINUE HERE *** *** CONTINUE HERE *** *** CONTINUE HERE *** *** CONTINUE HERE *** *** CONTINUE HERE *** *** CONTINUE HERE ***

ahttp://www.haskell.org/cabal/user-guide