GHC 9.6

Online Haskell Compiler

Purely functional, statically typed programming playground with GHC compiler. Write code with auto-formatting, test with standard input (stdin), and inspect terminal output in real-time.

✓ Pure functional purity & immutability✓ Hindley-Milner static type inference✓ Monadic I/O and curried functions✓ getLine standard input
Main.hs
GHC 9.6
13px
Standard Input (stdin)
Passed to scanf, input(), cin, etc.
UTF-8Haskell (GHC)2 SpacesWrap: Off
Ctrl+Enter to Run
Ln 1, Col 117 lines566 chars
Output & ConsoleIdle

Ready to Compile & Run

Click the blue ▶ Run button in the header bar or press Ctrl + Enter to compile and execute your Online Haskell Compiler.

How to Run Haskell (GHC) Code Online

Compile and evaluate purely functional Haskell code using Glasgow Haskell Compiler (GHC).

  1. Define module Main with main :: IO (), press "▶ Run".

Common Errors & Troubleshooting

Encountering compilation or runtime diagnostics? Check these common scenarios:

parse error on inputCheck indentation alignment and layout rule compliance.

Related Functional Programming Compilers

View all 35+ compilers →
Clojure.clj

Dynamic functional Lisp dialect targeting the Java Virtual Machine

Elixir.exs

Concurrent, functional language built on the resilient Erlang BEAM runtime

Frequently Asked Questions (Haskell (GHC))

Yes, compiles with standard GHC optimization flags.