Difference between revisions of "Applications and libraries"

From HaskellWiki
Jump to: navigation, search
m (changed link to hackage)
m (Haskell 2010 libraries: archived dead link)
 
(90 intermediate revisions by 29 users not shown)
Line 1: Line 1:
__NOTOC__
 
  +
[[Category:Libraries]] [[Category:Tools]]
   
Applications, libraries and tools written in Haskell.
 
  +
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.
   
Developers: if you release any Haskell code, please document it for the
 
  +
== Haskell library collections ==
community, by adding it to the appropriate category on this page.
 
   
== Standard libraries ==
+
=== Haskell Prelude ===
  +
The most important Haskell library is called the [https://hackage.haskell.org/package/base-4.12.0.0/docs/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 first places to look for data types or functions are:
 
  +
=== Haskell 2010 libraries ===
* [http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html The Standard Prelude]
 
  +
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://web.archive.org/web/20191229055836/https://prime.haskell.org/ Haskell'] process.
* [[Language and library specification]]
 
* [http://www.haskell.org/ghc/docs/latest/html/libraries/index.html The Standard Hierarchical Libraries]
 
* [http://haskell.org/hoogle Hoogle]
 
* [http://hackage.haskell.org/trac/hackage The Hackage database] (beta)
 
   
== Categories of Libraries and Tools ==
 
  +
Haskell modules that almost everybody uses are in this group, for example:
  +
[http://www.haskell.org/onlinereport/haskell2010/haskellch13.html Control.Monad], [http://www.haskell.org/onlinereport/haskell2010/haskellch20.html Data.List]
  +
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.
   
Third party libraries and tools for Haskell, or written in Haskell:
 
  +
=== 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 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).
   
* [[/Program development/]]
 
  +
Examples of libraries that are GHC 7.8.3 boot libraries (but not core libraries, see below):
* [[/Data structures/]]
 
  +
[http://hackage.haskell.org/package/haskeline haskeline],
* [[/Extended Haskell/]]
 
  +
[http://hackage.haskell.org/package/integer-gmp integer-gmp] and
* [[/Interfacing other languages|Tools for interfacing with other languages]]
 
  +
[http://hackage.haskell.org/package/terminfo terminfo].
* [[/Operating system/|Operating systems and systems programming]]
 
  +
* [[/Network/]]
 
  +
=== 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:
  +
[http://hackage.haskell.org/package/mtl Monad transformer library],
  +
[http://hackage.haskell.org/package/random random] and
  +
[http://hackage.haskell.org/package/parallel parallel].
  +
  +
=== Haskell Platform libraries ===
  +
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:
  +
[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 ===
  +
[http://hackage.haskell.org/packages/archive/pkg-list.html Hackage] is the final layer of the Haskell library collections. [http://hackage.haskell.org/packages/archive/pkg-list.html Hackage] aims to provide a comprehensive collection of released Haskell packages, similar to Perl's CPAN or Python's PyPI.
  +
  +
Start on [http://hackage.haskell.org/packages/archive/pkg-list.html Hackage] if you are looking for some functionality that did not come preinstalled with the [http://www.haskell.org/platform/ Haskell Platform].
  +
  +
See also the [[Hackage|Hackage wiki page]] and [[Cabal/How to install a Cabal package | 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 [http://hackage.haskell.org/packages/archive/pkg-list.html Hackage] for the latest list.
  +
  +
* [[/Music and sound/|Audio, music and sound]]
  +
* [[/Bioinformatics/]]
 
* [[/Concurrency and parallelism/]]
 
* [[/Concurrency and parallelism/]]
* [[/Database interfaces/]]
 
* [[/GUI libraries|Graphical User Interface Libraries]]
 
* [[/Graphics/]]
 
* [[/Web programming|Web, HTML, XML]]
 
* [[/Compiler tools|Parsing, lexing and regular expressions]]
 
* [[/Pretty printing|Pretty-printer libraries]]
 
* [[/Editors/]]
 
* [[/Mathematics/|Mathematics and physics]]
 
 
* [[/Compilers and interpreters/]]
 
* [[/Compilers and interpreters/]]
* [[/Theorem provers/]]
 
  +
* [[/Compiler tools|Compiler construction, lexing, parsing, pretty printing]]
* [[/Hardware verification/]]
 
* [[/Robots/]]
 
* [[/Music and sound/|Audio, music and sound]]
 
* [[/Genetic programming/]]
 
* [[/Linguistics|Linguistics and natural language processing]]
 
 
* [[/Cryptography|Cryptography and hashing]]
 
* [[/Cryptography|Cryptography and hashing]]
  +
* [[/Data structures | Data Structures and IO Libraries]]
  +
* [[/Database interfaces/]]
  +
* [[/Editors|Editors written in Haskell]] and [[Editors|editors for Haskell]].
  +
* [[/Extended Haskell/]]
 
* [[/Games/]]
 
* [[/Games/]]
 
* [[/Generic programming/]]
 
* [[/Generic programming/]]
  +
* [[/GUI libraries|Graphical User Interface (GUI) Libraries]]
  +
* [[/Graphics/]]
  +
* [[/Hardware verification/]]
  +
* [[/Linguistics|Linguistics and natural language processing]]
  +
* [[/Mathematics/|Mathematics and physics]]
  +
* [[/Network/]]
  +
* [[/Operating system/|Operating systems and systems programming]] (also emulators)
  +
* [[/Program development/]]
  +
* [[/Robotics/]]
  +
* [[/Statistics/]]
  +
* [[/Theorem provers/]]
  +
* [[/Interfacing other languages|Tools for interfacing with other languages]]
  +
* [[Web|Web, HTML, XML]]
   
 
Other places to look include:
 
Other places to look include:
* The Haskell [http://haskell.org/communities/ community reports]
 
  +
* The [[Library]] hierarchy page on this wiki.
* The archives of the [[Haskell Weekly News]]
 
  +
* The Haskell [[Haskell Communities and Activities Report|community reports]].
 
* The [http://www.haskell.org/mailman/listinfo/libraries mailing list] for discussion of issues related to libraries.
 
* The [http://www.haskell.org/mailman/listinfo/libraries mailing list] for discussion of issues related to libraries.
* freshmeat.net has [http://freshmeat.net/browse/834/?topic_id=834 an alternative list of software written in Haskell]
 
   
== Guidelines ==
 
  +
You can also [http://www.reddit.com/r/haskell_proposals/top/?t=month propose and vote on new libraries] that you'd like on [http://www.reddit.com/r/haskell reddit], and look at our past [http://web.archive.org/web/20170721102552/ghc.haskell.org/trac/summer-of-code/ Summer of Code proposals].
  +
  +
== Guidelines for developers ==
  +
  +
[[Image:Cabal-With-Text-small.png|frame|Built with Cabal]]
   
Best practices for making new submissions:
 
  +
Developer guides:
   
  +
* [[How to write a Haskell program|How to write a new Haskell library]]
  +
* [[Library submissions|How to propose changes to the standard libraries]]
  +
* [http://web.archive.org/web/20071011215053/http://pupeno.com/2006/12/12/the-lambda-revolution-v/ Creating a .deb from a Haskell Cabal package] (in the Web Archive)
 
* Guide to making standard [[Library submissions|library submissions]]
 
* Guide to making standard [[Library submissions|library submissions]]
* [[How to write a Haskell program]]
 
  +
* If you notice the library documentation is lacking, or could be improved, [http://www.haskell.org/haskellwiki/Improving_library_documentation please report it here]
* If you notice the library documentation is lacking, or could be improved, [http://haskell.org/haskellwiki/Improving_library_documentation please report it here]
 
  +
* [[Future projects]], more projects people would like.
* [http://www.google.com/codesearch Google Code Search] can help identify common idioms, improving your API
 
* [[Recommendations|Advice]] on the best libraries to use for particular problem cases.
 
* Project activity for some of the larger Haskell projects is graphed [http://www.cse.unsw.edu.au/~dons/images/commits/community/ here].
 
 
* [[Cabal]], The Common Architecture for Building Applications and Libraries, is a framework for packaging, building, and installing any tool developed in the Haskell language.
 
* [[Cabal]], The Common Architecture for Building Applications and Libraries, is a framework for packaging, building, and installing any tool developed in the Haskell language.
  +
* [[Hack-Nix]], a set of tools based on the [http://nixos.org Nix] package manager to manage multiple setups to build a project
   
 
Proposals for the module name space layout that can be used to guide the construction of new libraries.
 
Proposals for the module name space layout that can be used to guide the construction of new libraries.
   
* [http://www.haskell.org/~simonmar/lib-hierarchy.html Simon Marlow's current guide]
 
  +
* [[Hierarchical module names|Almost current guide]]
 
* [http://www.cs.york.ac.uk/fp/libraries/layout.html Proposal 1]
 
* [http://www.cs.york.ac.uk/fp/libraries/layout.html Proposal 1]
 
* [http://www.cs.york.ac.uk/fp/libraries/layoutSM.html Proposal 2]
 
* [http://www.cs.york.ac.uk/fp/libraries/layoutSM.html Proposal 2]
   
== Libraries for other languages ==
+
=== 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
 
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
   
* [http://www.cs.ru.nl/~clean/Download/Download_Libraries/body_download_libraries.html Clean]
+
* [http://wiki.clean.cs.ru.nl/Libraries Clean]
* [http://cm.bell-labs.com/cm/cs/what/smlnj/doc/basis/index.html Standard ML]
+
* [http://www.standardml.org/Basis/ Standard ML]
* [http://caml.inria.fr/pub/docs/manual-ocaml/manual034.html Objective Caml]
+
* [http://web.archive.org/web/20070515163201/caml.inria.fr/pub/docs/manual-ocaml/manual034.html Objective Caml]
 
* [http://srfi.schemers.org/ Scheme]
 
* [http://srfi.schemers.org/ Scheme]

Latest revision as of 01:40, 1 March 2020


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