Difference between revisions of "Applications and libraries"

From HaskellWiki
Jump to navigation Jump to search
m (Typo)
(Copy paste from Library_submissions)
(9 intermediate revisions by the same user not shown)
Line 8: Line 8:
 
The most important Haskell library is called the [http://www.haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html Prelude]. It is implicitly imported by default, and includes the most commonly used functions. Make sure you know what they do and how to use them effectively.
 
The most important Haskell library is called the [http://www.haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html Prelude]. It is implicitly imported by default, and includes the most commonly used functions. Make sure you know what they do and how to use them effectively.
   
=== The Haskell 2010 libraries ===
+
=== Haskell 2010 libraries ===
 
The Haskell 2010 [[Language and library specification]] defines a set of [http://www.haskell.org/onlinereport/haskell2010/haskellpa2.html libraries] with basic functionality which all Haskell implementations should support, including the Prelude. Changes to these libraries are handled by the [http://hackage.haskell.org/trac/haskell-prime/ Haskell'] process.
 
The Haskell 2010 [[Language and library specification]] defines a set of [http://www.haskell.org/onlinereport/haskell2010/haskellpa2.html libraries] with basic functionality which all Haskell implementations should support, including the Prelude. Changes to these libraries are handled by the [http://hackage.haskell.org/trac/haskell-prime/ Haskell'] process.
   
Line 15: Line 15:
 
and [http://www.haskell.org/onlinereport/haskell2010/haskellch41.html System.IO]. Within GHC, these are mostly grouped into the [http://hackage.haskell.org/package/base base] package, but for example [http://www.haskell.org/onlinereport/haskell2010/haskellch14.html Data.Array] is in the [http://hackage.haskell.org/package/array array] package.
 
and [http://www.haskell.org/onlinereport/haskell2010/haskellch41.html System.IO]. Within GHC, these are mostly grouped into the [http://hackage.haskell.org/package/base base] package, but for example [http://www.haskell.org/onlinereport/haskell2010/haskellch14.html Data.Array] is in the [http://hackage.haskell.org/package/array array] package.
   
=== The GHC core libraries ===
+
=== GHC bootstrap libraries ===
GHC comes with an expanded version of the Haskell 2010 libraries. Together these are called the [http://www.haskell.org/ghc/docs/latest/html/libraries/index.html GHC core libraries]. Changes to these libraries are handled by the package maintainer if one exists, or the [[Library submissions]] process if not. [http://www.haskell.org/hoogle/ Hoogle] - the Haskell API Search Engine - indexes the [http://www.haskell.org/ghc/docs/latest/html/libraries/index.html GHC core libraries].
+
GHC comes with an expanded version of the Haskell 2010 libraries. Together these are called the [http://www.haskell.org/ghc/docs/latest/html/libraries/index.html GHC bootstrap libraries]. You should not rely on this list being stable, since it is just the list of packages that are needed to build GHC itself (including ghci and the user guide).
  +
  +
Examples of libraries that are GHC 7.8.3 boot libraries (but not core libraries, see below):
  +
[http://hackage.haskell.org/package/haskeline haskeline],
  +
[http://hackage.haskell.org/package/integer-gmp integer-gmp] and
  +
[http://hackage.haskell.org/package/terminfo terminfo].
  +
  +
=== Core Libraries ===
  +
The core libraries form a subset of the packages in the Haskell Platform that has submitted to the management process described on the [[Library submissions]] page.
  +
  +
These packages typically define basic APIs that are expected to be available in any Haskell implementation, packages that are being maintained for backwards compatibility, or in some cases, which are just needed as glue to hold the rest of the platform together.
  +
  +
Not all GHC boot libraries are core libraries.
   
 
Examples of libraries, or packages, that belong to this group are:
 
Examples of libraries, or packages, that belong to this group are:
[http://hackage.haskell.org/package/bytestring bytestring],
+
[http://hackage.haskell.org/package/mtl Monad transformer library],
[http://hackage.haskell.org/package/containers containers] and [http://hackage.haskell.org/package/Win32 Win32].
+
[http://hackage.haskell.org/package/random random] and
  +
[http://hackage.haskell.org/package/parallel parallel].
   
 
=== Haskell Platform libraries ===
 
=== Haskell Platform libraries ===
On top of the GHC standard libraries, the [http://www.haskell.org/platform/ Haskell Platform] comes preinstalled with some additional packages that together form the [http://www.haskell.org/platform/contents.html#packages-and-documentation Haskell Platform libraries]. These libraries have been thoroughly tested before being included. The addition of these libraries with the [http://www.haskell.org/platform/ Haskell Platform] is what makes it 'batteries included'.
+
On top of the Core Libraries, the [http://www.haskell.org/platform/ Haskell Platform] comes preinstalled with some additional packages that together form the [http://www.haskell.org/platform/contents.html#packages-and-documentation Haskell Platform libraries]. These libraries have been thoroughly tested before being included. The addition of these libraries with the [http://www.haskell.org/platform/ Haskell Platform] is what makes it 'batteries included'.
   
  +
Examples of included packages are:
Examples of included packages are: [http://hackage.haskell.org/package/mtl Monad transformer library], [http://hackage.haskell.org/package/parallel parallel] and [http://hackage.haskell.org/package/QuickCheck QuickCheck].
+
[http://hackage.haskell.org/package/attoparsec attoparsec], [http://hackage.haskell.org/package/network network] and [http://hackage.haskell.org/package/QuickCheck QuickCheck].
   
 
=== The Hackage database ===
 
=== The Hackage database ===

Revision as of 07:49, 29 September 2014


The number of Haskell packages is growing rapidly. The section 'Haskell library collections' gives an ordering of all these packages by relative importance. In the section 'Haskell applications and libraries' an ordering by category is given. Finally some guidelines for developers of new packages are presented.

Haskell library collections

Haskell Prelude

The most important Haskell library is called the Prelude. It is implicitly imported by default, and includes the most commonly used functions. Make sure you know what they do and how to use them effectively.

Haskell 2010 libraries

The Haskell 2010 Language and library specification defines a set of libraries with basic functionality which all Haskell implementations should support, including the Prelude. Changes to these libraries are handled by the Haskell' process.

Haskell modules that almost everybody uses are in this group, for example: Control.Monad, Data.List and System.IO. Within GHC, these are mostly grouped into the base package, but for example Data.Array is in the array package.

GHC bootstrap libraries

GHC comes with an expanded version of the Haskell 2010 libraries. Together these are called the GHC bootstrap libraries. You should not rely on this list being stable, since it is just the list of packages that are needed to build GHC itself (including ghci and the user guide).

Examples of libraries that are GHC 7.8.3 boot libraries (but not core libraries, see below): haskeline, integer-gmp and terminfo.

Core Libraries

The core libraries form a subset of the packages in the Haskell Platform that has submitted to the management process described on the Library submissions page.

These packages typically define basic APIs that are expected to be available in any Haskell implementation, packages that are being maintained for backwards compatibility, or in some cases, which are just needed as glue to hold the rest of the platform together.

Not all GHC boot libraries are core libraries.

Examples of libraries, or packages, that belong to this group are: Monad transformer library, random and parallel.

Haskell Platform libraries

On top of the Core Libraries, the Haskell Platform comes preinstalled with some additional packages that together form the Haskell Platform libraries. These libraries have been thoroughly tested before being included. The addition of these libraries with the Haskell Platform is what makes it 'batteries included'.

Examples of included packages are: attoparsec, network and QuickCheck.

The Hackage database

Hackage is the final layer of the Haskell library collections. Hackage aims to provide a comprehensive collection of released Haskell packages, similar to Perl's CPAN or Python's PyPI.

Start on Hackage if you are looking for some functionality that did not come preinstalled with the Haskell Platform.

See also the Hackage wiki page and how to install a Cabal package.

Haskell applications and libraries

Applications, libraries and tools for Haskell or written in Haskell have been classified below, but you should check Hackage for the latest list.

Other places to look include:

You can also propose and vote on new libraries that you'd like on reddit, and look at our past Summer of Code proposals.

Guidelines for developers

Built with Cabal

Developer guides:

Proposals for the module name space layout that can be used to guide the construction of new libraries.

Libraries for other languages

If you are thinking about designing a new library for Haskell, you ought to look what has been done in other languages. Here are standard library definitions for