Applications and libraries
- The copyright status of this work is not known. Please help resolve this on the talk page.
This page is being restructured, if possible refrain from editing it today. If you want to add something send an e-mail to email@example.com -- BjornBringert, 2006-03-22
The first place to look for data types or functions that do what you want is the Standard Prelude, then the Language and library specification (both parts of the Haskell standards documentation), then in whatever extra libraries are provided by the Haskell implementation you are using, then on the page you are looking at. If it is not here, then it may be in the archives of the Haskell Weekly News.
Search the standard libraries collection (by name or type signature) using Hoogle.
- 1 Program Development
- 2 Data structures
- 3 Extended Haskell
- 4 Interfacing with other languages and systems
- 5 Graphical User Interface Libraries
- 6 Graphics
- 7 Web, HTML, XML
- 8 Pretty-printer libraries
- 9 Compiler and compilation tools
- 10 Music
- 11 Numerical algorithms and mathematics
- 12 Hardware verification
- 13 Robots
- 14 Cognitive Science
- 15 Various
- 16 Collections of libraries
- 17 Libraries for other languages
There is an effort underway to standardise many of the extra libraries that come with Haskell implementations, and at the same time extend the module namespace into a hierarchy. A document describing this project can be found here, and there is a mailing list for discussing issues related to libraries.
A large collection of standard hierarchical libraries are currently distributed with GHC (from version 5.04), Hugs (from Nov 2003), and nhc98 (from 1.16).
Cabal, The Common Architecture for Building Applications and Libraries, is an framework for packaging, building, and installing any tool developed in the Haskell language.
This page is intended as a comprehensive list of all Haskell libraries and tools. Some of these are proof-of-concepts rather than production code. Some have no longer been maintained for a long time.
On freshmeat.com there is an alternative list of public domain software written in Haskell. That list is currently short (for you to change that), but in particular it displays the current development status of the software. Even more Haskell projects are documented in the community reports and in the archives of the Haskell Weekly News.
The contents of this section have been moved to ProgramDevelopment.
The contents of this section have been moved to DataStructures.
The contents of this section have been moved to ExtendedHaskell.
Interfacing with other languages and systems
- HaXR - the Haskell XML-RPC library
- An XML-RPC client and server library. XML-RPC is "remote procedure calling using HTTP as the transport and XML as the encoding. XML-RPC is designed to be as simple as possible, while allowing complex data structures to be transmitted, processed and returned."
- HAIFA is an implementation of parts of the web-service architecture in Haskell. Notably it includes an XML serializer, a partial implementation of XML Schema and SOAP/1.1.
Tools for interfacing with other languages
The definition of a basic foreign function interface for Haskell (FFI) is finished. It has been agreed on and implemented by most Haskell implementors. The following tools already produce code for this interface. The Guide to Haskell's Foreign Function Interface provides a comparision of the different tools.
- Green Card
- Green Card is a foreign function interface preprocessor for Haskell, simplifying the task of interfacing Haskell programs to external libraries (which are normally exposed via C interfaces). Green Card is currently able to generate code compatible with the [../implementations.html#ghc Glasgow Haskell Compiler], [../implementations.html#hugs Hugs] and [../implementations.html#nhc nhc].
- HaskellDirect is an Interface Definition Language (IDL) compiler for Haskell, which helps interfacing Haskell code to libraries or components written in other languages (C). An IDL specification specifies the type signatures and types expected by a set of external functions. One important use of this language neutral specification of interfaces is to specify COM (Microsoft's Component Object Model) interfaces, and HaskellDirect offers special support for both using COM objects from Haskell and creating Haskell COM objects. HaskellDirect groks both the OSF DCE dialect of IDL (including the various extensions introduced by the Microsoft IDL compiler) and the OMG IIOP/CORBA dialect.
- A lightweight tool for implementing access to C libraries from Haskell.
- Haskell FFI Binding Modules Generator (HSFFIG) is a tool that takes a C library include file (.h) and generates Haskell Foreign Functions Interface import declarations for items (functions, structures, etc.) the header defines.
- A Java Native Interface for Haskell. Allows Haskell to invoke Java code. Includes a tool to generate Haskell bindings for a Java library. Works for hugs and ghc under both Linux and Windows.
- Haskell/Java VM Bridge
- A bridge to the Java virtual machine via JNI for Haskell.
- HaskellScript is the collective name for all Haskell components, both tools and libararies, that allow interaction with the COM/ActiveX framework.
- A tool to simplify the process of interfacing C libraries to Haskell. It is less powerful than HaskellDirect, but easier to use and more portable.
Interfaces to specific systems
- A library for compiling and loading plugins into a running Haskell program.
- A library for using Haskell for tasks which are usually done by shell scripts, e.g. command line parsing, analysing paths, etc.
- CGI Library
- CGI programs can receive input from the client's web browser, encoded in a complicated fashion, and can write output in a variety of formats (plain text, HTML, JPEG etc) which the client then sees. The decoding and encoding of the IO is often expressed in PERL or C, and makes CGI applications tedious and awkward to write. Haskell/CGI is a library for writing CGI programs in Haskell 1.3 and above.
- CGI Library
- An all-in-one-file version of Erik Meijer's CGI library (above) with some bugs fixed, a few extensions and ported to Haskell 98.
- daVinci binding
- A binding to daVinci, an X-Windows based visualization tool for directed graphs.
- hMPI is an acronym for HaskellMPI. It is a Haskell binding conforming to MPI (Message Passing Interface) standard 1.1/1.2. The programmer is in full control over the communication between the nodes of a cluster.
- Smarty(since 10/06/2003: via Internet Archive)
- The world's smartest i/o device for Haskell. An interface between Haskell and Squeak, a freely available Smalltalk language and environment.
- A small library, based on runProcess in the standardised posix library. It provides lazy output from subprocesses.
- This package allows Haskell programmers to write CORBA clients and servers using the MICO open-source CORBA implementation. It defines a Haskell language mapping for CORBA, and includes an IDL compiler which generates Haskell stub and skeleton modules from IDL files.
Interfacing with databases
The contents of this section have been moved to DatabaseInterfaces.
Graphical User Interface Libraries
The contents of this section have been moved to GUILibraries.
The contents of this section have been moved to Graphics.
Web, HTML, XML
The contents of this section have been moved to WebProgramming.
The contents of this section have been moved to PrettyPrinting.
Compiler and compilation tools
- Manuel Chakravarty's Compiler Toolkit
- There is a significant set of functionality that is required in each compiler like symbol table management, input-output operations, error management, and so on, which are good candidates for code reuse. The Compiler Toolkit is an attempt to provide an open collection of modules for these recurring tasks in Haskell.
- The Zephyr Abstract Syntax Description Lanuguage (ASDL)
- ASDL is a language designed to describe the tree-like data structures in compilers. Its main goal is to provide a method for compiler components written in different languages to interoperate. ASDL makes it easier for applications written in a variety of programming languages to communicate complex recursive data structures. asdlGen is a tool that takes ASDL descriptions and produces implementations of those descriptions in C, C++, Java, Standard ML, and Haskell.
- Typing Haskell in Haskell
- A Haskell program that implements a Haskell typechecker, thus providing a mathematically rigorous specification in a notation that is familiar to Haskell users.
- Hatchet is a type checking and inference tool for Haskell 98, written in (almost) Haskell 98.
- The BNF Converter
- A High-Level Tool for Implementing Well-Behaved Programming Languages.
- ATerm Library
- ATerms provide a generic format for representation and exchange of (annotated) terms. ATerms were developed in the context of the ASF+SDF Meta-Environment. They are also used by the rewriting language Stratego, by the transformation tool bundle XT, by the visitor generator JJForester, and by numerous other tools developed at CWI, Universiteit Utrecht, and elsewhere.
- Attribute Grammar
- How can attribute grammars help at the separation of concerns, at things related to the goals of aspect oriented programming? How do they relate to other concepts like monads and arrows? Why are they important for the functional programmer? See Wouter Swierstra's WhyAttributeGrammarsMatter. Utrecht University's Attribute Grammar System tools include also an attribute grammar compiler, UUAGC. The concept of attribute grammar was used in their Essential Haskell Compiler project, which gives us not only a working programming language, but also a good didactical material about using attribute grammars, e.g. in writing compilers.
Scanner and parser generators
- Happy is a parser generator system for Haskell, similar to the tool `yacc' for C. Like `yacc', it takes a file containing an annotated BNF specification of a grammar and produces a Haskell module containing a parser for the grammar.
- Frown is an LALR(k) parser generator for Haskell 98 written in Haskell 98.
- A parser generator for Haskell using monadic parser combinators. It was developed to be compatible with Happy.
- Utrecht Parser Combinator Library
- The combinators in this library analyse the grammar on the fly and build parsers that are quite efficient. An interesting aspect is that parsing results become available on the fly without hanging on to the input. The parsers will give extensive error reports of erroneous situations, and wil proceed with parsing.
- A simple, well documented monadic parser combinator library for fast parsers with good error messages.
- A parser for Haskell written purely in Haskell (using the Happy parser generator).
- Standalone distribution of the self-optimising lexer (i.e. regex) and parser combinators of the Compiler Toolkit (CTK).
- Alex: A Lexical Analyser Generator
- Alex 2.0 is a Lex-like package for generating Haskell scanners.
- The Haskell Dynamic Lexer Engine
- This system is completely dynamic: the lexer may be modified at runtime, and string buffers may be lexed by different lexers at different times.
- The Haskore Computer Music System
- Haskore is a collection of Haskell modules designed for expressing musical structures in the high-level, declarative style of functional programming. Haskore is a means for describing music - in particular Western Music - rather than sound. It is not a vehicle for synthesizing sound produced by musical instruments, for example, although it does capture the way certain (real or imagined) instruments permit control of dynamics and articulation. Haskore compositions can be translated into various executable formats like MIDI and printed in traditional notation.
- A set of Haskell modules written on top of Haskore to make it easier to sequence simple, repetitive music.
Numerical algorithms and mathematics
- Geometric Algorithms
- A small Haskell library, that contains algorithms for two-dimensional convex hulls, triangulations of polygons, Voronoi-diagrams and Delaunay-triangulations, the QEDS data structure, kd-trees and range-trees.
- Digital Signal Processing
- Modules for matrix manpulation, digital signal processing, spectral stimation, and frequency estimation.
- Papers by Jerzy Karczmarczuk
- Some interesting uses of Haskell in mathematics, including functional differentiation, power series, continued fractions.
- DoCon - Algebraic Domain Constructor
- A small Computer Algebra System
- The HaskellMath library is a sandbox for me to experiment with mathematics algorithms. So far I've implemented a few quantitative finance models (Black Scholes, Binomial Trees, etc) and basic linear algebra functions. Next I might work on either computer algebra or linear programming. All comments welcome!
- Wrapper to CLAPACK
- High level functional interface to standard linear algebra computations and other numerical algorithms based on the GNU Scientific Library.
- Numeric Prelude
- Experimental revised framework for numeric type classes.
- Exact Real Arithmetic
- A portal-like treatment of the topic. There are functional programming materials too, even with downloadable Haskell source.
- Probabilistic Functional Programming
- The PFP library is a collection of modules for Haskell that facilitates probabilistic functional programming, that is, programming with stochastic values. The probabilistic functional programming approach is based on a data type for representing distributions. A distribution represent the outcome of a probabilistic event as a collection of all possible values, tagged with their likelihood. A nice aspect of this system is that simulations can be specified independently from their method of execution. That is, we can either fully simulate or randomize any simulation without altering the code which defines it.
- mirror of the following numeric modules of Jan Skibinski
- Numerics with fractions(since 10/06/2003: via Internet Archive)
- Roots of polynomials(since 10/06/2003: via Internet Archive)
- It implements the well known Laguerre's method for finding complex roots of polynomials.
- Indexless linear algebra algorithms(since 10/06/2003: via Internet Archive)
- Orthogonalization, solution of linear equations, eigenvalues and eigenvectors.
- State vector evolution(since 10/06/2003: via Internet Archive)
- Short study of fuzzy oscillator(since 10/06/2003: via Internet Archive)
- N-dimensional tensors(since 10/06/2003: via Internet Archive)
- Sinc function
- Hawk, Specifying and Prototyping Microprocessors
- The goal of the Hawk project is to develop a language for expressing highly abstracted specifications of modern microprocessor designs, to provide design teams with the ability to dynamically explore a wide range of design choices. The Hawk language is Haskell plus the Hawk library.
- Lava is a hardware description language based upon Haskell.
- Haskell for Vision and Robotics
- Frob is an Embedded Domain Specific Language for controlling
robots. It is built using the principals of Functional Reactive
Programming, as developed by Conal Elliott for the Fran animation
system. The current incarnation of Frob is part of the Yampa FRP system.
(Tools, algorithms, frameworks, paradigms concerning Genetic Programming, Artificial Intelligence, Neural Networks, Fuzzy Logic, Natural Language Processing etc.)
Dr. Tina Yu's publications, many of them on fruitful applications of Functional Programming in Genetic Programming.
Deryck F. Brown, A. Beatriz Garmendia-Doval and John A. W. McCall, A Genetic Algorithm Framework Using Haskell
Natural language processing
See the Linguistics page.
- Editor combinators allow to assemble structure editors compositionally instead of generating them from descriptions, just as parsing combinators allow to assemble parsers compositionally instead of employing parser generators to generate parsers from grammar descriptions.
- Expander2 is a flexible multi-purpose workbench for rewriting, verification, constraint solving, flow graph analysis and related procedures that build up proofs or computation sequences. Moreover, tailor-made interpreters display terms as 2D structures ranging from trees and rooted graphs to tables, fractals and other turtle-system-generated pictures.
- Strafunski is a Haskell bundle that provides support for generic programming in Haskell, based on the concept of a functional strategy. It consists of a combinator library (StrategyLib) and a precompiler (DrIFT-Strafunski).
- FunGEn - a game engine for Haskell
- FunGEn (Functional Game Engine) is a 2D platform-independent game engine implemented in and for Haskell, using HOpenGL. It is intended to help game programmers in the game development process, in a faster and automated way.
- The Haskell Cryptographic Library
- A library of cryptographic functions collected together in one package.
- A number theory library, RSA library, and RSA programs.
- Implementations of MD5, SHA1 and DES
- Regular expression library
- Inspired by the Perl regular expression library, written purely in Haskell. Also part of the GHC distribution.
- Partial v0.1
- The Partial library provides a partial order class. It also provides routines for generating a Hasse diagram from a set and a partial order. Renderers are provided for the abstract Hasse diagram representation into LaTeX (via Xy-pic) and into dot, the format for AT&T's Graphviz tools. Since no horizontal sorting is done, the Xy-pic output is rather poor at present; dot does a much better job with its layout optimisation algorithm.
- fun->pdf(since 10/06/2003: via Internet Archive)
- An implementation of a PDF dynamic writer in Haskell.
- A module for GNU-/POSIX-like option handling of commandline arguments
Collections of libraries
- Software available from the York FP group
- John Meacham's Haskell tools and libraries
- Andrew Rock's library of useful modules
- Libraries by Ralf Hinze for data structures, sorting, searching, parsing, pretty printing, numerical algorithms, monads, etc.
- Collection of Haskell modules (since 10/06/2003: via Internet Archive) by Jan Skibinski, Numeric Quest Inc.
- Sven's Haskell Libaries for interfacing to DaVinci, HTML/Cgi, OpenGL; a module for option handling, a Haskell parser, a binary library.
- Ian Lynagh's Haskell libraries
- Reid Consulting's Libraries and Programs CMI, TSL, Knit, Greencard, HGL, HSX11, HSWin32
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