What is Haskell written in?
What Haskell is used for
Haskell is a purely functional language used in academia, research, and industries that prize correctness, finance, compilers, and formal verification. Its strong type system and laziness make it a laboratory for language ideas later adopted elsewhere.
Notable software: the Cardano blockchain, parts of financial trading systems, and the pandoc document converter.
About Haskell
Haskell is a purely functional programming language. It is a statically typed and garbage-collected language that compiles ahead of time to native machine code. It supports functional programming.
Haskell first appeared in 1990 and was designed by Lennart Augustsson, Warren Burton, Kevin Hammond, and Paul Hudak. Development is led by John Hughes. Haskell keeps a steady, moderate following today.
Haskell in the language family tree
Haskell drew on ideas from ML, Miranda, Lisp, Clean, and Hope and went on to influence Elm, PureScript, CoffeeScript, Rust, F#, and Python.
Sources: Wikipedia · Wikidata · Official site
Quick Facts
- Short answer
- GHC is written in Haskell
- Runtime system
- Written in C
- Self-hosting
- Yes
- Backend
- Native code generator or LLVM
GHC and its C runtime
GHC compiles Haskell to native code, optionally through an LLVM backend. The compiler is a large Haskell program and is bootstrapped from a previous GHC. Underneath sits the runtime system (RTS), written in C, which implements Haskell's lazy evaluation, lightweight threads, and generational garbage collector.
Frequently Asked Questions
Evidence Sources
- https://en.wikipedia.org/wiki/Haskell
- https://en.wikipedia.org/wiki/Elm_(programming_language)
- https://en.wikipedia.org/wiki/PureScript
- https://en.wikipedia.org/wiki/CoffeeScript
- https://doc.rust-lang.org/reference/influences.html
- https://www.haskell.org/ghc/
- https://github.com/elm/compiler
- https://github.com/purescript/purescript
- https://gitlab.haskell.org/ghc/ghc
- https://fsharp.org/history/hopl-final/hopl-fsharp.pdf
- https://en.wikipedia.org/wiki/Glasgow_Haskell_Compiler
- https://en.wikipedia.org/wiki/Python_(programming_language)
- https://en.wikipedia.org/wiki/Scala_(programming_language)
- https://en.wikipedia.org/wiki/Swift_(programming_language)
- https://en.wikipedia.org/wiki/Idris_(programming_language)
- https://en.wikipedia.org/wiki/Agda_(programming_language)
- https://en.wikipedia.org/wiki/Kotlin_(programming_language)
- https://en.wikipedia.org/wiki/TypeScript
- https://en.wikipedia.org/wiki/Raku_(programming_language)
- https://en.wikipedia.org/wiki/Clean_(programming_language)
- https://en.wikipedia.org/wiki/Hope_(programming_language)
- https://en.wikipedia.org/wiki/Roc_(programming_language)
- https://en.wikipedia.org/wiki/Unison_(programming_language)
- https://en.wikipedia.org/wiki/Lean_(proof_assistant)
- https://en.wikipedia.org/wiki/Nix_(package_manager)
- Haskell on Wikidata (Q34010)