Haskell

Edit · View history

Haskell is a standardized, general-purpose, purely functional programming language with non-strict semantics and strong static typing. Named after the logician Haskell Curry, it was first specified in 1990 by a committee of researchers. Haskell features a type system based on Hindley–Milner type inference and lazy evaluation, making it a cornerstone of functional programming research and education.

Features

Haskell’s core features include pure functions, lazy evaluation, algebraic data types, pattern matching, and type classes. The language enforces referential transparency: functions have no side effects unless explicitly declared via monads such as IO. This purity simplifies reasoning about code and enables powerful compiler optimizations. Lazy evaluation (call‑by‑need) means expressions are evaluated only when their results are required, allowing infinite data structures and modular code composition.

Type classes provide a form of ad‑hoc polymorphism, enabling generic operations like equality (==) and ordering (<) to be defined uniformly. Haskell’s type system also supports higher‑kinded types, generalized algebraic data types (GADTs), and type families, giving advanced control over type‑level programming. The Glasgow Haskell Compiler (GHC), the most widely used implementation, extends the language with many such features.

History

Haskell emerged from a series of meetings in 1987–1988 aimed at consolidating existing lazy functional languages such as Miranda, LML, and Orwell. The first Haskell report (Haskell 1.0) was published in 1990. Subsequent revisions – Haskell 98, Haskell 2010 – standardized the language, while GHC continued to add experimental extensions. Haskell has influenced many languages, including Scala, F#, PureScript, and Idris. The Haskell community is known for its active open‑source ecosystem, including the Hackage package repository and the Stack build tool.

See also