Haskell · online compiler

Run Haskell online

Run Haskell online — GHC 9, purely functional, browser-hosted.

Available versions
Firecracker microVM live per-test verdicts multi-file compile

Haskell is the reference pure-functional language: lazy evaluation, algebraic data types, a type system so strong that `undefined` and `partial pattern match` are the only escape hatches. If you have never worked in a language where the compiler catches everything, this is where you go.

ls-judge compiles Haskell with GHC 9 inside a Firecracker microVM. Prelude is available; extra Hackage packages are not (no network).

Starter code

What you get in Haskell

Clicking "Run now" opens the playground with this exact code and a matching test case pre-loaded — passes on first Run.

haskell
Haskell 9.10
main :: IO ()
main = do
  line <- getLine
  let n = read line :: Int
  print (n * 2)
stdin →21
expected →42
FAQ

Common questions about Haskell on ls-judge

Which GHC?
GHC 9.x — the current major line.
Cabal / stack packages?
No network — Prelude and base libraries only.
GHC2021 extensions?
Enabled by default.
Free?
Yes.
Further reading
Also try