encyclopegia.org

Haskell

Haskell ( ) is a general-purpose, statically typed, purely functional programming language with type inference and lazy evaluation. Haskell pioneered several programming language features including type classes for type-safe operator overloading and monadic input/output (IO). It is named after logician Haskell Curry. Haskell's main implementation is the Glasgow Haskell Compiler (GHC). Haskell's semantics are historically based on those of the Miranda programming language, which served to focus the efforts of the initial Haskell working group. The last formal specification of the language was made in July 2010, while the development of GHC continues to expand Haskell via language extensions. Haskell is used in academia and industry. , Haskell was the 28th most popular programming language by Google searches for tutorials, and made up less than 1% of active users on the GitHub source code repository.

Haskell ( ) is a general-purpose, statically typed, purely functional programming language with type inference and lazy evaluation. Haskell pioneered several programming language features including type classes for type-safe operator overloading and monadic input/output (IO). It is named after logician Haskell Curry. Haskell's main implementation is the Glasgow Haskell Compiler (GHC). Haskell's semantics are historically based on those of the Miranda programming language, which served to focus the efforts of the initial Haskell working group. The last formal specification of the language was made in July 2010, while the development of GHC continues to expand Haskell via language extensions. Haskell is used in academia and industry. , Haskell was the 28th most popular programming language by Google searches for tutorials, and made up less than 1% of active users on the GitHub source code repository. So-called n+k patterns (definitions of the form fact (n+1) = (n+1) * fact n ) were no longer allowed. This syntactic sugar had misleading semantics, in which the code looked like it used the (+) operator, but in fact desugared to code using (-) and (>=) . The rules of type inference were relaxed to allow more programs to type check. Some syntax issues (changes in the formal grammar) were fixed: pattern guards were added, allowing pattern matching within guards; resolution of operator fixity was specified in a simpler way that reflected actual practice; an edge case in the interaction of the language's lexical syntax of operators and comments was addressed, and the interaction of do-notation and if-then-else was tweaked to eliminate unexpected syntax errors. The LANGUAGE pragma was specified. By 2010, dozens of extensions to the language were in wide use, and GHC (among other compilers) provided the LANGUAGE pragma to specify individual extensions with a list of identifiers. Haskell 2010 compilers are required to support the Haskell2010 extension and are encouraged to support several others, which correspond to extensions added in Haskell 2010. module Main (main) where -- not needed in interpreter, is the default in a module file main :: IO () -- the compiler can infer this type definition main = putStrLn "Hello, World!" The factorial function in Haskell, defined in a few different ways (the first line is the type annotation, which is optional and is the same for each implementation): factorial :: (Integral a) => a -> a -- Using recursion (with the "ifthenelse" expression) factorial n = if n Using Haskell's Fixed-point combinator allows this function to be written without any explicit recursion. import Data.Function (fix) factorial = fix fac where fac f x | x As the Integer type has arbitrary-precision, this code will compute values such as factorial 100000 (a 456,574-digit number), with no loss of precision. An implementation of an algorithm similar to quick sort over lists, where the first element is taken as the pivot: -- Type annotation (optional, same for each implementation) quickSort :: Ord a => [a] -> [a] -- Using list comprehensions quickSort [] = [] -- The empty list is already sorted quickSort (x:xs) = quickSort [a | a = x] -- Sort the right part of the list -- Using filter quickSort [] = [] quickSort (x:xs) = quickSort (filter ( =x) xs) ==Reception== Jan-Willem Maessen, in 2002, and Simon Peyton Jones, in 2003, discussed problems associated with lazy evaluation while also acknowledging the theoretical motives for it. In addition to purely practical considerations such as improved performance, they note that lazy evaluation makes it more difficult for programmers to reason about the performance of their code (particularly its space use). Bastiaan Heeren, Daan Leijen, and Arjan van IJzendoorn in 2003 also observed some stumbling blocks for Haskell learners: "The subtle syntax and sophisticated type system of Haskell are a double edged sword—highly appreciated by experienced programmers but also a source of frustration among beginners, since the generality of Haskell often leads to cryptic error messages." To address the error messages researchers from Utrecht University developed an advanced interpreter called Helium, which improved the user-friendliness of error messages by limiting the generality of some Haskell features. In particular it disables type classes by default. Ben Lippmeier designed Disciple as a strict-by-default (lazy by explicit annotation) dialect of Haskell with a type-and-effect system, to address Haskell's difficulties in reasoning about lazy evaluation and in using traditional data structures such as mutable arrays. He argues (p. 20) that "destructive update furnishes the programmer with two important and powerful tools ... a set of efficient array-like data structures for managing collections of objects, and ... the ability to broadcast a new value to all parts of a program with minimal burden on the programmer." Robert Harper, one of the authors of Standard ML, has given his reasons for not using Haskell to teach introductory programming. Among these are the difficulty of reasoning about resource use with non-strict evaluation, that lazy evaluation complicates the definition of datatypes and inductive reasoning, and the "inferiority" of Haskell's (old) class system compared to ML's module system. Haskell's build tool, Cabal, has historically been criticized for poorly handling multiple versions of the same library, a problem known as "Cabal hell". The Stackage server and Stack build tool were made in response to these criticisms. Cabal has since addressed this problem by borrowing ideas from the package manager Nix, with the new approach becoming the default in 2019. ==Conferences and workshops== Haskell events have been regularly held concurrent with the International Conference on Functional Programming (ICFP) including workshops such as the Haskell Symposium (formerly the Haskell Workshop) and Commercial Users of Functional Programming. Other events include the Haskell Implementors Workshop, ZuriHac in Zurich, and Hac: The Haskell Hackathon. ==Bibliography== Reports Textbooks Real World Haskell (full text). (full text) Tutorials Learn You a Haskell for Great Good! - A community version (learnyouahaskell.github.io). An up-to-date community maintained version of the renowned "Learn You a Haskell" (LYAH) guide. Assumes far less prior knowledge than official tutorial. History ==External links==

References

No reference rows published for this article.

Cite this article

MLA

"Haskell." encyclopegia.org, 2026, https://encyclopegia.org/wiki/haskell. Accessed 24 November 2026.

Chicago

"Haskell." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/haskell.

APA

encyclopegia.org. (2026). Haskell. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/haskell

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Jeffrey Street

enwiki · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1378707559 · 0.5 · snapshot enwiki-001378707559

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.