ghci
Interactive REPL environment for Haskell
TLDR
Start interactive session
$ ghci
Load a file$ ghci [file.hs]
Load module in session$ :load [file.hs]
Get type of expression$ :type [expression]
Reload current module$ :reload
SYNOPSIS
ghci [options] [files]
DESCRIPTION
ghci is the interactive environment for GHC (Glasgow Haskell Compiler). It provides a REPL for evaluating Haskell expressions, loading modules, and exploring types interactively.
GHCi supports all GHC language extensions and can compile modules on the fly. It provides introspection commands for examining types, kinds, and documentation. Tab completion and command history enhance usability.
PARAMETERS
FILES
Haskell files to load.:load FILE
Load a module.:reload
Reload current modules.:type EXPR
Show expression type.:info NAME
Show info about name.:quit
Exit GHCi.-i DIR
Add to import path.--help
Display help information.
CONFIGURATION
~/.ghci
Startup file loaded when GHCi starts, containing default settings, imports, and custom commands.
CAVEATS
Some compiled code may behave differently in interpreter. Memory usage can grow with large expressions. Restart clears interpreter state.
HISTORY
GHCi was introduced with GHC 5.0 in 2001, providing interactive Haskell evaluation alongside the batch compiler.

