typestar

Languages

Haskell

A purely functional language with lazy evaluation and a strong static type system.

Practice Haskell

27 steps across 1 tours, from the basics to complete programs.

The tours

First released
1990
Created by
The Haskell Committee
Typing
Static and inferred; pure by default, lazy by default, effects in the types
Snippets target
GHC 9.14
File extensions
.hs, .lhs

What it is for

Haskell is where the ideas ship from: type inference, typeclasses, monads, lazy evaluation, and property-based testing were all worked out here before Rust, Swift, Scala, and TypeScript imported the usable parts. Banks and trading firms (Standard Chartered, Bitnomial), hardware verification, and compilers for other languages (PureScript, Elm, Agda) run on it in production, usually where being wrong is expensive.

The daily experience is a conversation with the compiler: you write a type signature, the compiler tells you every place the program disagrees, and refactoring is following the errors until they stop. Purity means a function's signature tells you everything it can do — IO appears in the type or the function cannot perform it — which is why 'it compiles, therefore it works' is a running joke with an unusual amount of truth in it.

The famous barriers — laziness, monads, an ecosystem that assumes you read papers — are smaller than their reputation in the GHC2021 core these seeds drill: equations, pattern matches, folds, algebraic data types, and do-notation. What that subset teaches transfers everywhere: every Optional, Result, map/filter/reduce chain, and exhaustive switch in a modern codebase is Haskell with the serial numbers filed off.

Where it came from

By the late 1980s a dozen research groups each had their own lazy functional language, and none had users. A 1987 meeting at the FPCA conference appointed a committee to define one common language; Haskell 1.0 — named for the logician Haskell Curry — arrived in 1990, with the report deliberately owned by no single company or lab.

The 1998 report ('Haskell 98') froze a stable core, and the Glasgow Haskell Compiler became the de facto implementation, growing the extension system where new type-system research landed first. Simon Peyton Jones and Philip Wadler's papers from this era — monads for IO, typeclasses — turned academic machinery into working engineering, and 'avoid success at all costs' became the community's wry mission statement.

GHC2021 bundled two decades of settled extensions into a modern default, and the language quietly professionalized: a foundation, a stable release cadence, and industrial users who picked it on purpose. Its research-lab role continues — linear types and dependent types are arriving through the same pipeline that once delivered monads — while its exports keep turning up in every mainstream language's release notes.

What it is like to type

Haskell types in short bursts with heavy operator traffic: :: and -> in every signature, $ and . chaining calls, <- and = in do-blocks, and backticks turning functions infix. There are almost no parentheses compared to a Lisp or braces compared to a C, but indentation is load-bearing — where-clauses and do-blocks must line up exactly, and the seeds' alignment is part of the exercise. Watch for the apostrophe in names like total' — legal, idiomatic, and easy to drop.

Practice Haskell

27 steps across 1 tours, from the basics to complete programs.

Official documentation

Other languages