Fact-checked by Grok 2 weeks ago

Glasgow Haskell Compiler

The Glasgow Haskell Compiler (GHC) is an open-source, native-code compiler and interactive environment for the functional programming language Haskell, serving as its primary implementation and supporting compilation to machine code, LLVM bitcode, or C. It includes the GHCi REPL for interactive development and features extensive optimizations, lazy evaluation, type inference, and support for Haskell language extensions such as type classes and monads. Developed collaboratively by a global community under guidance from the University of Glasgow and contributors including Simon Peyton Jones, GHC has evolved into a robust tool used in academia, research, and industry for building reliable, high-performance software. GHC originated in 1989 at the as an academic project funded by the UK government, emerging from efforts to implement the newly designed language. A prototype was created in January 1989 by Kevin Hammond using the Lazy ML (LML) system, becoming operational by June, with full development starting in autumn under Cordelia Hall, Will Partain, and , who implemented it in itself. The first public beta release arrived on April 1, 1991, followed by version 0.10 in December 1992, aligning with the Haskell 1.0 standard. Early milestones included the addition of monadic I/O in July 1993 and multi-parameter type classes in version 3.00 (1997), solidifying GHC's role in advancing 's and practicality. Architecturally, GHC consists of a frontend for , renaming, and type checking Haskell source; an intermediate representation called (a variant of System , a ); multiple optimization phases; and backends for , complemented by a (RTS) written in C that manages garbage collection, lightweight threads, and concurrency. Key technical contributions include the Spineless Tagless G-machine for efficient (1992) and short-cut optimizations using the foldr/build rule (1993), enabling high-performance execution on standard hardware. Today, GHC supports 2010 and later revisions, with ongoing enhancements like parallel programming via GHC extensions and integration with tools such as QuickCheck for property-based testing; the latest stable release as of September 2025 is version 9.10.3.

Overview

Description

The Glasgow Haskell Compiler (GHC) is an open-source native code for the programming language, originally developed at the starting in January 1989. is a standardized, general-purpose, language characterized by , where expressions are evaluated only when needed, enabling and immutability as core principles. GHC serves as the implementation of , supporting the Haskell 2010 language standard while providing extensive extensions for advanced features. GHC's primary functionalities include compiling Haskell source code into standalone executable binaries for various platforms, often leveraging optimizations for high performance. It also offers an interactive mode via GHCi, allowing developers to evaluate expressions, load modules, and debug code in . Additionally, GHC generates intermediate representations such as , a simplified functional , which facilitates , optimization, and integration with other tools in the ecosystem. The compiler's first public beta release occurred on , 1991, marking an early milestone in its evolution from an academic project to a robust tool. Today, GHC plays a pivotal role in for advancing research, including type systems and optimization techniques, and in for building reliable, concurrent systems in domains like and .

Licensing and Availability

The Glasgow Haskell Compiler (GHC) is released under the BSD 3-clause license, a permissive that allows users to freely use, modify, and distribute the software, provided they retain the original copyright notice, conditions, and disclaimer in all copies or substantial portions of the software. This licensing framework has been in effect since 2007, succeeding earlier custom license terms that were revised to facilitate wider adoption and integration within the open-source ecosystem. GHC is publicly available through official downloads on the Haskell website, offering pre-built binary packages tailored for major operating systems and architectures such as (x86_64 and ), macOS (x86_64 and ARM64), Windows (x86_64), and others including . The complete resides in a repository, which has hosted the project since its migration from earlier systems in December 2018, enabling developers to clone, fork, and submit contributions via merge requests. Users can install GHC via straightforward binary installers provided in the downloads, which include platform-specific setup scripts and integrate GHC with tools like the interactive environment GHCi. Alternatively, package managers simplify the process: on macOS, Homebrew users can run brew install ghc to fetch and configure the latest stable version; on Windows, supports installation with choco install ghc, handling dependencies automatically. For advanced users preferring customization, building GHC from source is supported on POSIX-compliant systems, requiring a GHC installation (version 9.0.1 or later) and external dependencies such as the lexical analyzer tool (version 3.2.6 or later), the parser generator Happy (version 1.19.9 or later), or , GNU Make, , and autotools like and ; comprehensive build instructions outline platform-specific prerequisites and compilation steps. Distributing GHC derivatives, modified versions, or contributions must comply with the BSD 3-clause terms, which prohibit the use of the 's or contributors' names for endorsement or promotion without prior written permission, while ensuring the license notice accompanies all redistributions to maintain transparency and legal clarity.

History

Origins and Early Development

The Glasgow Haskell Compiler (GHC) was founded in January 1989 at the as part of the broader effort to implement the newly designed programming language, which sought to standardize non-strict, following the Haskell 1.0 report published in April 1990. This initiative emerged from the need for an efficient, portable to demonstrate the viability of in , a feature that delayed computation until values were required, enabling more expressive and modular code compared to earlier strict languages. Prior implementations like Lazy ML (LML) from Chalmers University, a lazy functional language with efficient graph reduction via the G-machine, and Yale Haskell, a lazy but less community-oriented effort led by Paul Hudak, highlighted the demand for a robust, optimizing to support research and practical applications. Early development involved a core team of researchers focused on creating a to validate Haskell's design, with Kevin Hammond leading the initial implementation in LML as a front-end to the Chalmers LML , achieving functionality by 1989 and incorporating Haskell 1.0 features like type classes. joined the project in autumn 1989, alongside Cordelia Hall and Will Partain, bringing expertise in functional language implementation; Peyton Jones would go on to lead GHC's development until 2019. Additional key contributors included from Chalmers, who contributed to Haskell's committee and later developed the HBC , as well as collaborators from Yale such as Paul Hudak and from like , reflecting the multi-institutional ties that drove Haskell's creation. The first GHC prototype, bootstrapped in Haskell itself, utilized combinator-based graph reduction techniques to handle lazy evaluation efficiently, with the initial working version ready by early 1990. This culminated in the first beta release on , 1991, which supported core Haskell semantics and marked a milestone in proving lazy functional programming's practicality. Early work was funded primarily through UK public grants, including SERC support for the GRASP project (grants GR/F98444 and GR/F34671) and joint DTI/SERC funding for related functional language research, enabling the academic collaboration at .

Major Releases and Milestones

The Glasgow Haskell Compiler (GHC) achieved full compliance with the Haskell 98 standard in version 6.0, released on May 28, 2003, marking a significant milestone in stabilizing the language implementation for broader adoption. This release focused on refining the core compiler to align precisely with the revised Haskell 98 specification from December 2002, enabling reliable use in production environments. Subsequent versions built on this foundation, with GHC 7.0.1, released on November 16, 2010, introducing support for the Haskell 2010 standard by default, which incorporated extensions like foreign function interface improvements and conditional compilation. Later releases emphasized advanced language features, such as GHC 9.0.1 in February 2021, which debuted the LinearTypes extension for resource-sensitive programming, allowing linear types to enforce single-use semantics for values like file handles or continuations. GHC 9.4, released in August 2022, added the OverloadedRecordDot extension, enabling more ergonomic record field access via dot notation that supports overloading for custom types. As of November 2025, the most recent stable LTS release is GHC 9.10.3, released on , 2025. Key milestones include the introduction of the interactive GHCi environment in GHC 5.00 (April 2001), which revolutionized development by providing an REPL for rapid prototyping and debugging. The backend arrived around 2009–2010, offering an alternative path that improved performance on certain architectures through LLVM's optimization infrastructure. From 2009 to 2014, the Industrial Haskell Group (IHG) provided targeted funding for GHC enhancements, such as dynamic library support on and Windows, addressing industrial needs for deployable binaries. In 2018, GHC migrated its source repository to and , streamlining collaboration and issue tracking for the open-source community. GHC adopted a semantic versioning scheme starting with major version 8.0 in 2017, where major releases introduce potentially breaking changes, minor versions add features compatibly, and patch releases focus on fixes, exemplified by the structured progression from 8.0 to subsequent series. This aligns with a consistent release cadence of approximately six months for major versions since the mid-2010s, ensuring timely delivery of innovations while maintaining stability for (LTS) branches like 9.6 and 9.10. In July 2025, GHC announced a new LTS release policy, with the first LTS branch planned for 9.14 in August 2025. In 2024, GHC deprecated support for 32-bit platforms on (macOS/iOS) and Windows, reflecting declining hardware relevance and developer resource constraints, with binary distributions ceasing and future removal planned. Community governance has evolved with significant involvement from Well-Typed, a consultancy firm that has contributed extensively to GHC development since 2008, including core optimizations and . The Haskell Prime process, which guides revisions to the Haskell standard, draws heavily from GHC extensions, ensuring that innovations like linear types influence future specifications through committee review. This collaborative model, bolstered by IHG's earlier efforts and ongoing foundation support, underscores GHC's role as the .

Architecture

Frontend

The frontend of the Glasgow Haskell Compiler (GHC) comprises the initial compilation stages that transform source code into an intermediate representation suitable for further processing. It handles , , name resolution, and checking, and desugaring, ensuring adherence to Haskell's syntax and semantics while providing robust diagnostics for errors encountered during these phases. This pipeline operates on modules independently where possible, supporting features like Template Haskell splicing that may require iterative passes. Lexical analysis begins with a lexer generated by the tool, which scans the input source file character by character to produce a of according to Haskell's lexical conventions, including identifiers, literals, keywords, and symbols. The lexer supports Haskell's layout rule, which uses indentation to imply syntactic structure such as block delimiters, by tracking position information in to enable context-sensitive . This stage filters out comments and whitespace, ensuring the token accurately reflects the program's structure without extraneous elements. The parser, implemented using the Happy parser generator from the grammar defined in compiler/GHC/Parser.y, consumes the token stream to construct an (AST) in the HsSyn representation, where identifiers are initially raw strings (RdrName). It handles Haskell's , including layout-sensitive constructs like where clauses and list comprehensions, and produces a that preserves source positions for error reporting. The parser is designed to be modular, allowing reuse in tools like GHCi for interactive input. The renamer follows parsing and resolves all occurrences of identifiers to unique, qualified names (Name) in the HsSyn AST, managing Haskell's module system by processing import and export declarations to build a global name environment. It handles scoping rules, including lexical scoping, qualified imports, and re-exports, while detecting ambiguities such as name clashes or shadowed bindings and flagging unused imports or local definitions as warnings. Additional tasks include fixing the precedence of infix operators based on their declared fixity and expanding parentheses in expressions to explicit applications. The renamer operates in a single pass per module, producing a renamed AST (HsSyn Name) that serves as input to type checking. Type checking employs Haskell's Hindley-Milner (HM) for polymorphic , generating type constraints from the renamed and solving them via unification to assign principal types to expressions and declarations. The process creates fresh type variables for unknowns, unifies them during inference (e.g., matching function argument and parameter types), and generalizes polymorphic types at let-bindings using let-generalization rules. For extensions like generalized algebraic data types (GADTs), the type checker integrates specialized unification that allows existential types and pattern-match refinements, ensuring type equality constraints are satisfied without full instantiation. Constraint solving handles type classes and instances through an external solver interface, supporting improvements like the OutsideIn(X) algorithm for better error localization. The output is a type-annotated (HsSyn Typechecked), with all types explicit and verified for consistency. Desugaring translates the type-checked Haskell AST into Core, a small, explicitly typed lambda calculus that serves as GHC's intermediate language for optimizations. This stage eliminates surface syntax sugar, such as converting do-notation for monads into bind operations (>>=), list comprehensions into applications of map and filter, and pattern guards into if-then-else constructs with guards. It also expands derived instances (e.g., for Eq or Show) and handles recursive definitions by introducing letrec bindings, resulting in a simplified, functional form without Haskell-specific idioms. The desugared Core retains type annotations and is positioned for the core-to-core optimization pipeline. Error reporting is integrated across frontend stages to provide actionable diagnostics, with the parser emitting syntax errors tied to token positions, the renamer highlighting scoping issues like undefined names or import conflicts, and the type checker generating detailed type mismatch explanations often including suggested fixes or hole-filled reports. Recent enhancements introduce a structured diagnostic framework using message envelopes for severity (error, warning) and categories, improving clarity and tool integration, such as in . All messages include source spans for precise location and leverage the for context-aware suggestions, minimizing user debugging effort.

Core Language and Optimizations

The language in GHC is a simplified, explicitly typed functional derived from extended with type equality coercions, known as System FC. It features a small set of constructs including variables, literals, applications, abstractions (both and type), let expressions, and case expressions, enabling a clean foundation for applying optimizations. Desugared is translated into Core by the frontend, providing a uniform platform independent of surface syntax details. This design facilitates modular analysis and transformation, with types tracked explicitly to ensure correctness throughout the pipeline. GHC's optimization pipeline applies over 25 transformation passes to code, organized into iterative phases of the central simplifier . These passes encompass inlining to eliminate calls, to hoist nested lambdas to top-level bindings, to remove redundant computations, and strictness to identify opportunities. Additional transformations include let-floating for better code layout, for simplifying applications, and join-point for optimizing recursive calls. The pipeline runs in multiple phases (typically four to two, decreasing iteratively), with each phase applying a sequence of rules to refine the for efficiency, balancing compile-time cost against runtime performance gains. Among the key techniques, the worker/wrapper transformation specializes functions by splitting them into a wrapper that handles boxed arguments and an unboxed worker that performs the computation, enabling unboxing of primitive types like integers and floats to avoid allocation overhead. This is particularly effective for strict functions identified via demand analysis. List fusion, implemented through rewrite rules, optimizes by composing producers and consumers; for example, the foldr/build rule fuses a list-building operation (using the generic build combinator) with a right fold (foldr), eliminating intermediate list allocations and reducing constant factors in time and space. Following Core optimizations, the transformed code is converted to the STG (Spineless Tagless G-machine) representation, an abstract graph reduction machine that models Haskell's semantics without explicit tags on closures, simplifying collection and runtime support. STG introduces low-level details like thunks and update frames while preserving the optimized structure from Core. For and , cost centers—markers for attributing execution costs to specific code regions—can be automatically inserted into Core during or after optimizations, with options like late insertion minimizing interference with passes such as inlining. This allows detailed runtime analysis, such as time and allocation , without unduly compromising generated code quality. As a example, consider fusing sum (a foldr over a list) with a list producer using build:
sum = foldr (+) 0
xs = build (\c n -> ... ) []
Without , this generates an intermediate list xs, allocating space. The foldr/build rewrites it directly to a loop over the builder's c, avoiding the list entirely and fusing the operations into a single pass. This can yield asymptotic improvements for chained list transformations, as verified in GHC's rule application during simplification.

Backend

The backend of the Glasgow Haskell Compiler (GHC) is responsible for transforming the optimized , known as Cmm (a variant of the C-- language), into executable or other target formats. This phase handles low-level , including instruction selection, , and platform-specific output, ensuring efficient execution on diverse hardware. GHC supports multiple backends to balance compilation speed, code quality, and portability, with the native code generator serving as the default for most scenarios. The Native Code Generator (NCG) directly compiles Cmm to assembly code for architectures such as x86, , ARM, , PowerPC, and others, producing native executables without external dependencies. It employs instruction selection to map Cmm operations to machine instructions, followed by using techniques like or iterative coalescing to minimize spills and optimize performance. The NCG also applies optimizations, which heuristically rewrite short instruction sequences for efficiency, such as eliminating redundant loads or reordering for better utilization. This backend excels in speed and supports shared libraries effectively, making it suitable for production builds on supported platforms. Cmm, derived from the C-- intermediate language, acts as a portable, low-level representation that bridges higher-level optimizations and final code emission, facilitating custom targets through its C-like syntax with explicit stack management and imperative constructs. This design enhances portability by abstracting architecture-specific details until the final generation step, allowing GHC to target new platforms with minimal changes to upstream components. While primarily internal, C-- enables extensions like alternative backends without overhauling the core pipeline. Starting with version 7.0 in 2010, GHC has offered an optional backend that translates Cmm to for further optimization and via the , often yielding superior performance in numeric and array-intensive workloads compared to the NCG. This integration requires versions 13 through 20 installed, including tools like opt and llc, and is invoked with the -fllvm flag; it supports , macOS, and Windows but incurs higher compilation overhead due to external processing. The backend leverages LLVM's advanced optimizations, such as , while preserving Haskell's semantics through careful handling of the . For , GHC includes a backend, evolved from the independent GHCJS project and merged into the mainline compiler in 2022, which compiles code to JavaScript while maintaining compatibility with GHC's core pipeline up to optimized STG intermediates. This allows Haskell applications to run in browsers, with ongoing support for features like Template Haskell in related targets. Final linking incorporates the (RTS), a C-based component linked into every executable to manage essential services including a generational collector for , lightweight threading via a work-stealing scheduler for parallelism, and I/O operations. The RTS supports concurrent collection options, such as the non-moving collector introduced in GHC 8.10, which reduces latency in threaded programs without requiring code changes beyond the -threaded flag. This setup ensures portability and efficiency across platforms, handling Haskell's non-strict evaluation model transparently.

Language Implementation

Conformance to Haskell Standards

The Glasgow Haskell Compiler (GHC) aims to conform fully to the Haskell 2010 language standard, serving as its de facto reference implementation for core features, including modules, types, expressions, input/output (I/O), and the foreign function interface (FFI). Modules in GHC adhere to the standard's specifications for export and import lists, instance declarations, and separate compilation, enabling modular program structure with abstract datatypes. Type system conformance covers user-defined datatypes, type classes, overloading, and predefined types, ensuring type safety and inference as defined in the report. Expressions follow the standard for variables, operators, lambda abstractions, pattern matching, and constructs like let, case, and do notation. I/O operations conform to the IO monad semantics, including sequencing, exception handling, and file management via handles. The FFI supports interoperability with foreign languages, particularly C, through declarations for external entities and data marshalling. GHC retains partial support for the legacy Haskell 98 standard to maintain compatibility with older codebases, though it is deprecated in favor of 2010 and later editions. This support includes the core syntax and semantics of Haskell 98 but omits some deprecated features, with GHC defaulting to 2010 mode unless explicitly configured otherwise. For standard libraries, GHC's base package implements the 2010 Prelude and core modules, providing conformance for fundamental types, classes, and functions while flagging any GHC-specific additions or modifications through language pragmas. The base package ensures portability of standard I/O, numeric operations, and monadic structures across compliant implementations. Compliance with Haskell standards is verified through GHC's comprehensive testsuite, which includes correctness tests for language features and library behaviors, alongside community-driven validation efforts to align with the official reports. This testing infrastructure helps maintain adherence, though some infelicities persist. Known deviations from Haskell 2010 include variations in lazy evaluation strictness; for instance, GHC's implementation of seq can eta-expand functions, potentially making certain error-handling cases more defined than specified, which can be adjusted via the -fpedantic-bottoms flag. In I/O, functions like hGetContents may throw exceptions on errors rather than discarding them silently, diverging from Haskell 98 but applicable in Haskell 2010 contexts. Standard library deviations encompass stricter evaluation in functions like splitAt and extended support for numeric literals in Read, such as hexadecimal formats. The FFI lacks support for re-initializing the runtime after hs_exit(), contrary to the addendum's expectations. These deviations are documented to guide users toward standard-compliant code. GHC also supports extensions beyond Haskell 2010 for advanced features, as covered in separate documentation.

Extensions to Haskell

The Glasgow Haskell Compiler (GHC) extends the Haskell language through a flexible pragmas system that allows users to enable non-standard features on a per-module or global basis. This system supports two primary mechanisms: the LANGUAGE pragma, which can be placed at the top of a Haskell source file to activate specific extensions portably across compilers, and command-line flags prefixed with -X, such as -XOverloadedStrings, for project-wide or invocation-specific enabling. Extensions like OverloadedStrings (which treats string literals as instances of the IsString typeclass for polymorphic string handling), BangPatterns (enabling strictness annotations in patterns with !), and RankNTypes (supporting higher-rank polymorphism via explicit forall quantifiers in types) exemplify this system's granularity, allowing developers to opt into enhanced expressiveness without altering core Haskell compliance. GHC's extensions include several influential innovations in , type systems, and concurrency. Template Haskell, introduced in 2003, enables compile-time by allowing code to generate and splice other code during compilation, facilitating tasks like automated boilerplate derivation and domain-specific languages. Generalized algebraic data types (GADTs), added in 2005, extend algebraic data types to support and refined return types for constructors, enabling more precise type-safe representations such as typed expression evaluators. Type families, available since 2007, introduce type-level functions that compute types from other types, supporting associated type families in classes for modular type computations like vector indexing or heterogeneous lists. More recent extensions address advanced and ergonomics. Linear types, implemented in GHC 9.0 in 2021, introduce multiplicity tracking where linear arrows 1 -> require their argument to be used exactly once, enforced through static linearity checks during and desugaring to ensure no accidental duplication or discarding of resources like file handles or GPU buffers. Record dot , stabilized in GHC 9.2 and enhanced in subsequent releases around 2023 via the OverloadedRecordDot extension, provides concise field access (e.g., person.name) by desugaring to getField calls, improving readability for large records while supporting overloaded projections. GHC integrates (STM) as a core concurrency primitive since version 6.4, providing atomic, composable transactions via the STM monad and combinators like atomically, retry, and orElse, which abstract shared state updates with automatic on conflicts. For parallelism, the -threaded flag activates runtime support for multicore execution, paired with strategies from the parallel package using par (to parallel evaluation) and combinators in the monad, or the Par monad from monad-par for structured deterministic parallelism in computations like divide-and-conquer algorithms. Extensions can be disabled individually with -fno-extension or via the NoExtension , and recent GHC versions (9.0+) introduce language editions like GHC2021 and GHC2024, which bundle sensible defaults such as BangPatterns and TypeApplications for new projects, reducing boilerplate while maintaining opt-in control through flags or . This ecosystem of extensions, managed via GhcFlags in build tools like , empowers Haskell programmers to balance expressiveness, safety, and performance beyond the Haskell 2010 standard.

Portability

Supported Platforms

The Glasgow Haskell Compiler (GHC) runs natively on a range of operating systems and architectures, categorized into support tiers that reflect the level of testing, maintenance, and official binary availability. Tier 1 platforms are fully tested via continuous integration and must function correctly for each release, ensuring reliable host environments for compiling Haskell code. These include x86-64 architectures on Linux (across major distributions such as Ubuntu 22.04+, Debian 12, Fedora 40+, Alpine 3.20+), macOS (version 12.0+ including Sonoma 14 and Sequoia 15), and 64-bit Windows (10/11).
TierPlatformsNotes
1 Linux, macOS, Windows, / 13.xFull CI testing; official binaries provided; primary focus for releases (as of GHC 9.12, 2025).
2 Linux, 12.x, , x86 LinuxPartial testing; functional with community maintenance; binaries available for some (e.g., Linux on 12, 3.20+); binaries as Tier 2 in GHC 9.14 (2025). 32-bit x86 Linux remains supported but deprecated in favor of 64-bit.
Tier 3 platforms offer experimental support through community efforts, such as additional architectures like s390x, PowerPC (various OS), or RISC-V (64-bit Linux), but lack official guarantees or binaries. Tier 3 support for RISC-V was introduced in GHC 9.12 (2025), with ongoing enhancements including native code generation. Support for 32-bit Windows and Darwin platforms (including macOS and iOS) was deprecated following industry shifts—Microsoft ended new 32-bit Windows 10 OEM distributions in 2020, and Apple dropped 32-bit app support in macOS Catalina (10.15) in 2019—and fully removed in GHC 9.12 (2025). This change also ended iOS simulator support, as it relied on deprecated 32-bit components. Since 2024, Windows support is limited to 64-bit. 32-bit support is deprecated across all platforms. Building GHC from source on Unix-like systems (e.g., , macOS, , ) requires POSIX-compliant tools, including a C compiler ( 6.2 or later recommended), Make, and libraries like GMP for . On Windows, building necessitates Microsoft Visual C++ (MSVC, version 14.0 or later via ) for compiling C runtime components, alongside MSYS2 for emulation. A notable recent advancement is the full native support for on (M-series processors) introduced in GHC 8.10 (February 2020), with refinements in subsequent point releases like 8.10.4 for memory consistency and 8.10.7 for stable binaries; this enables efficient on macOS 11 () and later without emulation.

Cross-Compilation Capabilities

The Glasgow Haskell Compiler (GHC) enables cross-compilation, allowing Haskell code developed on a host system to be compiled for diverse target architectures and environments without requiring a native compiler on the target. This capability is essential for deploying Haskell applications to embedded systems, mobile devices, and web platforms, leveraging GHC's modular backend and toolchain configuration. Cross-compilation in GHC involves building a specialized version of the compiler configured for the desired target, which then generates executables or libraries compatible with that architecture. GHC supports cross-compilation to several key architectures, including x86-64, AArch64 (ARM64), PowerPC, s390x, Tier 3 support for RISC-V (64-bit) since GHC 9.12 (2025), as well as WebAssembly via its native backend (introduced in GHC 9.6, with Template Haskell and GHCi support added in 9.10+ as of 2024–2025). For non-native targets, users must first build a cross-compiler using the ./configure --target=<triple> script, where <triple> specifies the target (e.g., aarch64-unknown-linux-gnu for ARM64 Linux), followed by make to compile GHC itself for that target. This process requires a cross-toolchain, such as GCC or Clang configured for the target, to handle C dependencies and foreign function interfaces (FFI). Once built, the cross-compiler (often named like aarch64-linux-gnu-ghc) can be invoked directly or integrated with build tools like Cabal, using commands such as cabal configure --with-compiler=aarch64-linux-gnu-ghc to compile projects for the target, enabling workflows for platforms like Android and iOS through specialized setups that link against mobile SDKs. Recent improvements, such as the ghc-toolchain tool, simplify this by automating toolchain detection and configuration for common targets. Cross-compilation presents challenges, particularly in handling architecture-specific components like the (RTS), which must be ported or rebuilt for the to manage and threading correctly, often requiring adjustments for new architectures. Foreign calls via FFI necessitate a matching cross-C compiler to link libraries, while endianness differences are addressed through -specific code generation in GHC's backend. To support Template Haskell during cross-compilation, an external interpreter (iserv) must be built and deployed for the , as the host compiler cannot execute -specific splices directly. Solutions include using remote iserv proxies for , allowing the host to orchestrate compilation while running code in emulators. Practical examples demonstrate GHC's cross-compilation in action: for embedded systems like (AArch64), developers build a cross-GHC on x86 hosts and compile Haskell programs using standard workflows, linking against toolchains for deployment. Mobile development, such as Haskell for , involves configuring GHC with cross-compilers to produce shared libraries integrated into /Kotlin apps via JNI. For web environments, integration with GHCJS allows compilation to , though the native backend in GHC provides a more direct path for browser-targeted executables, albeit experimentally as of 2025, with growing ecosystem integration including GHCi browser mode. Limitations include incomplete cross-compilation support for Windows targets from Unix-like hosts without or MSYS2 environments, and ongoing experimental status for .

Tools and Ecosystem

Interactive Environment (GHCi)

GHCi serves as the interactive read-eval-print loop (REPL) environment for the Glasgow Haskell Compiler (GHC), launched via the ghci command-line tool. It functions primarily as a bytecode interpreter, allowing developers to load Haskell modules, evaluate expressions interactively, and interpret programs on the fly while supporting most GHC language extensions. Introduced with GHC version 6.0 in May 2003, GHCi has become essential for exploratory coding, rapid prototyping, and debugging in Haskell development. Key features of GHCi include direct expression at the prompt, where inputs like 1 + 2 immediately return 3, and support for IO actions such as putStrLn "hello". Type is facilitated by the :type command, which infers and displays types—for instance, :type [length](/page/Length) yields [a] -> Int (or more generally, Foldable t => t a -> Int with extensions). The integrated enables setting breakpoints via :break (e.g., :break 2 for line 2 of a ), single-stepping through with :step, and variable during pauses using :print or :force. Multi-shot allows handling nested contexts, with tools like :trace for step traces and :hist for , enhancing in complex sessions. GHCi compiles loaded modules to by default, a format optimized for quick interpretation and reloading during development, which contrasts with slower source-level evaluation. For performance gains—typically 10 to 20 times faster than —it can link pre-compiled using the -fobject-code or -dynamic flags, though this mode disables interactive debugging features like breakpoints and stepping. Customization options make GHCi adaptable to user workflows, including .ghci configuration files in the or for loading s or setting preferences on startup. Command is managed with a configurable depth ( 50 via -fghci-hist-size), and editor integration is supported through :edit to open files at errors or via :set editor for custom tools. Prompt customization, such as :set prompt "%s> " (where %s inserts the current ), aids visibility in integrated development environments. Advanced capabilities include the statement monad for imperative-style interactions at the prompt, enabling do-notation sequences like x <- getLine; return (length x) that default to the IO monad. Profiling within the REPL is possible using the external interpreter mode (-fexternal-interpreter -prof), which generates stack traces and statistics for interpreted code, requiring profiled dependencies.

Build and Package Management

The Glasgow Haskell Compiler (GHC) integrates with several tools for building and managing Haskell projects, primarily through Cabal and Stack, which handle dependency resolution, configuration, and reproducible builds. Cabal, introduced in 2005 as part of the Haskell infrastructure, serves as the foundational build system, using .cabal files to specify package metadata, dependencies, source files, and build configurations. It supports two build modes: the original v1 mode, which relies on a global package database, and the newer v2 mode (Nix-style local builds, introduced in Cabal 1.24 in 2016), which uses project-local stores for isolated dependency management and improved reproducibility. In both modes, Cabal invokes GHC to compile modules, linking them into executables or libraries while automatically handling flags like optimization levels and profiling. Stack, released in 2015, builds upon Cabal to provide a higher-level tool for reproducible builds across Haskell projects. It uses curated snapshots from Stackage, such as Long Term Support (LTS) Haskell releases, to pin specific GHC versions and package sets, ensuring consistent environments without manual version conflicts. For instance, a stack.yaml file specifies the resolver (e.g., lts-21.25 for GHC 9.4.8), and Stack downloads or builds the required GHC and packages on demand, integrating seamlessly with Cabal for the actual build process. This approach mitigates issues like dependency diamonds by enforcing a single version per snapshot, making it suitable for team development and CI/CD pipelines. For simpler configuration, Hpack offers a YAML-based alternative to native .cabal files, generating the latter from package.yaml files during the build. Introduced in 2016, Hpack emphasizes readability and modularity, supporting features like common stanzas for shared settings across executables and libraries, while remaining fully compatible with and . Users can thus maintain a single YAML source for package descriptions, which Hpack converts to .cabal format before invocation by build tools. GHC's integration with these tools includes ghc-pkg, a command-line utility for managing the package database, which registers installed libraries and exposes them to the compiler via flags like -package-db. Cabal and Stack leverage ghc-pkg to query and update databases during builds, ensuring GHC can locate dependencies. For enhanced reproducibility, Nix—a declarative package manager—supports Haskell environments by defining shells with specific GHC versions and packages in Nix expressions, often combined with haskell.nix overlays for Cabal/Stack integration. This allows pinning entire toolchains, avoiding system-wide installations. Best practices for build management include using .stack.yaml to pin resolvers and avoid GHC version mismatches, enabling flags like --allow-different-user for shared environments, and combining Stack with Cabal v2 for local package isolation. Developers should also validate configurations with commands like stack check or cabal check to detect issues early, promoting robust project maintenance.

Performance

Optimization Techniques

The Glasgow Haskell Compiler (GHC) employs a range of optimization flags to balance compilation time and runtime performance, with -O2 enabling the most aggressive set of safe transformations, including speculative inlining, specialization of recursive functions via -fspec-constr, and optimizations that may relax floating-point precision for speed under -fexcess-precision=standard. These flags build on lower levels like -O1, which activates basic specializations and worker-wrapper transformations, allowing developers to apply full optimizations selectively for production code. Key techniques target Haskell's lazy evaluation model to reduce overhead. Strictness analysis, enabled by default at -O, performs demand analysis to identify expressions that must be evaluated, enabling unboxing of strict arguments and avoiding thunk allocation for known strict contexts. Specialization optimizes overloaded functions, such as those from type classes, by generating type-specific versions via -fspecialise (from -O1), which eliminates dictionary passing and runtime dispatch for polymorphic calls. Deforestation, or fusion, eliminates intermediate data structures in stream-like computations through rewrite rules and stream fusion frameworks, transforming multi-pass algorithms into single-pass ones without explicit annotations. GHC's runtime system (RTS) includes a generational garbage collector, typically configured for two generations with a stop-the-world copying mechanism, tunable via +RTS flags to adjust memory behavior and reduce pauses. The -A flag sets the allocation area size (default 4MB), influencing GC frequency and efficiency, while -N enables collections for multi-core systems when using the threaded RTS. For parallelism, compiling with -threaded links against the threaded RTS, providing runtime support for multicore execution of concurrent Haskell code, including strategies like rpar from the parallel library for explicit task partitioning. Profiling tools aid in optimization by identifying bottlenecks; the -prof flag instruments code with cost centers for time and allocation profiling, generating reports via +RTS -p that attribute CPU and memory costs to functions, or heap profiles with +RTS -h to detect space leaks.

Benchmarks and Usage

The NoFib benchmark suite serves as the primary tool for assessing GHC's performance, encompassing categories such as (algorithmic tests like spectral-norm for matrix computations and wheel-sieve for prime generation) and real (application-oriented benchmarks simulating practical workloads). Recent enhancements, including higher-order patterns in rewrite rules implemented in GHC, yield measurable runtime speedups and reduced compile times on several NoFib tests, though results vary by benchmark. These enhancements include higher-order patterns in rewrite rules, yielding runtime speedups of up to 1.5× on several NoFib tests. The introduction of linear types in GHC 9.0 further contributes to efficiency by enabling predictable resource handling, which minimizes unnecessary allocations and supports in-place updates in data structures like arrays, leading to lower memory footprints in resource-intensive code. In comparative evaluations, GHC-compiled programs frequently outperform alternatives in benchmarks. For instance, on , implementations surpass in execution time for tasks like binary trees and n-body simulations, often by factors of 1.5 to 2 in optimized scenarios. Against F#, demonstrates superior performance; in multi-core Barnes-Hut n-body benchmarks, achieves speedups of up to 5.62× on 8 cores compared to F#'s 2.28× on 4 cores, owing to GHC's advanced support for . GHC sees widespread adoption in industry for its reliability in complex, safety-critical systems. Financial institutions like used it for domain-specific languages in equity derivatives pricing, while utilizes Haskell via GHC for , an anti-spam processing billions of signals daily. used GHC in , a cross-platform framework that handled high-throughput data in production environments. In academia and open-source projects, GHC powers tools like , a versatile document converter supporting over 40 formats, and , a dynamic emphasizing configurability and efficiency. The ecosystem's vitality is evident in Hackage, which as of January 2025 maintains a repository of packages exceeding 18,000 unique entries, fostering extensive reuse and innovation. Despite these strengths, GHC faces challenges in startup latency and memory consumption, particularly for large applications where dynamic linking delays initialization and collection can inflate resident set sizes during idle periods. These are commonly addressed via static linking to eliminate runtime loader overhead—reducing startup times by avoiding dynamic resolution—and RTS flags like - for proactive memory return to the OS, which in GHC 9.2 and later versions curbs excessive retention in long-running processes.

References

  1. [1]
    Ghc - Haskell.org
    GHC is an open-source compiler and interactive environment for Haskell, compiling to native code or LLVM, and generating C code.The GHC User’s Guide · GHC 9.6.7 download · GHC 9.10.2 download · Blog
  2. [2]
    The Architecture of Open Source Applications (Volume 2)The ...
    GHC is divided into the compiler, boot libraries, and the runtime system (RTS). The compiler converts Haskell code to machine code, and the RTS handles running ...
  3. [3]
    [PDF] A History of Haskell: Being Lazy With Class - Microsoft
    Apr 16, 2007 · Probably the most fully featured Haskell compiler today is the. Glasgow Haskell Compiler (GHC), an open-source project with a liberal BSD ...
  4. [4]
    [PDF] A History of Haskell: Being Lazy With Class - Simon Peyton Jones
    Apr 16, 2007 · We describe the developments leading up to Haskell and its early history (Section 2) and the processes and principles that guided its evolution ...<|control11|><|separator|>
  5. [5]
    Haskell Language
    Its flagship compiler, GHC, comes with a high-performance parallel garbage collector and light-weight concurrency library containing a number of useful ...Downloads · Documentation · Log in · Haskell Playground
  6. [6]
    Implementations - HaskellWiki - Haskell.org
    Mar 9, 2024 · Glasgow Haskell Compiler (GHC) ... GHC is an optimising compiler for Haskell, providing many language extensions. GHC is the de facto standard ...
  7. [7]
    Stretching the Glasgow Haskell Compiler: Nourishing GHC with ...
    Over the last decade Haskell has been productized; transitioning from a research language to an industrial strength language ready for large-scale systems.
  8. [8]
    License — The Glasgow Haskell Compiler
    The Glasgow Haskell Compiler License. Copyright 2004, The University Court of the University of Glasgow. All rights reserved.
  9. [9]
    1. Introduction — Glasgow Haskell Compiler 9.12.2 User's Guide
    ### Summary of GHC's Key Functionalities and Role
  10. [10]
    Glasgow Haskell Compiler / GHC · GitLab
    Dec 17, 2018 · A compiler and interactive environment for the Haskell functional programming language. For more information, visit GHC's web site.Glasgow Haskell Compiler · Nofib · Support for ARM64 Windows · Wiki
  11. [11]
    ghc - Homebrew Formulae
    ghc. Install command: brew install ghc. Also known as: ghc@9, ghc@9.12. Glorious Glasgow Haskell Compilation System. https://haskell.org/ghc/. License: BSD-3 ...
  12. [12]
    Chocolatey Software | GHC 9.8.2
    Step 1: Review Your Packages · Step 2: Choose Your Integration Method · Step 3: Enter Your Internal Repository Url · Step 3: Copy Your Script or Download Config.
  13. [13]
  14. [14]
    GHC 6.0 download — The Glasgow Haskell Compiler
    Version 6.0 (released 28 May 2003). Online Docs. Release Notes (vs. 5.04.x) · Building Guide · User's Guide & Libraries ...
  15. [15]
    ANNOUNCE: GHC version 6.0 - Haskell.org
    May 29, 2003 · ... release of the Glasgow Haskell Compiler (GHC), version 6.0. As with ... Haskell 98, agreed in December 1998, and revised in December 2002.
  16. [16]
    GHC 7.0.1 download — The Glasgow Haskell Compiler
    Version 7.0.1 (released 16 November 2010). Stop! For most users, we recommend installing the Haskell Platform instead of GHC. The current ...
  17. [17]
    1.8. Release notes for version 7.0.1 - Haskell.org Downloads
    GHC now defaults to the Haskell 2010 language standard. Libraries are not quite so straightforward. By default, GHC provides access to the base package, ...
  18. [18]
    GHC 9.0.1 is now available - Haskell.org
    Feb 4, 2021 · The GHC team is very pleased to announce the availability of GHC 9.0.1. Source and binary distributions are available at the usual place.
  19. [19]
    GHC 9.0.1 release candidate 1 now available - Haskell
    In addition to numerous bug fixes, GHC 9.0.1 will bring a number of new features: A first cut of the new LinearTypes language extension, ...
  20. [20]
    Glasgow Haskell Compiler (GHC) - endoflife.date
    Sep 15, 2025 · The Glasgow Haskell Compiler (GHC) is a state-of-the-art optimizing compiler for Haskell. It includes an interactive REPL, several profilers, alternative ...
  21. [21]
    6.5.9. Overloaded record dot — Glasgow Haskell Compiler 9.4.1 ...
    When OverloadedRecordDot is enabled one can write a.b to mean the b field of the a record expression. Example:.
  22. [22]
    GHC 9.12.1 is now available - Haskell.org
    Dec 16, 2024 · GHC 9.12.1 is now available. Zubin Duggal - 2024-12-16. The GHC developers are very pleased to announce the release of GHC 9.12.1.
  23. [23]
    What's new in GHC 2021 - by Chris Martin - Type Classes
    Mar 13, 2023 · Haskell has gone through a number of versioning schemes as things have evolved over the decades. ... GHC 6.4 was the first version to include the ...Missing: semantic 2014
  24. [24]
    [PDF] Low Level Virtual Machine for Glasgow Haskell Compiler - LLVM
    Oct 20, 2009 · This thesis details the motivation, design and implementation of a new back-end for the. Glasgow Haskell Compiler which uses the Low Level ...
  25. [25]
    Smoking fast Haskell code using GHC's new LLVM codegen
    Feb 21, 2010 · In this post we'll play with GHC's new LLVM code generator backend, and see how much faster some Haskell programs are when compiled with LLVM instead of GCC.
  26. [26]
    IHG Achievements - Industrial Haskell Group
    The IHG members have funded the effort to get Hackage 2 up to feature parity and get it ready for the switchover. The IHG funded this effort because while the ...
  27. [27]
    [PDF] Birth of the Industrial Haskell Group - Well-Typed
    What the IHG has funded so far. • Dynamic libraries on Linux. • Ongoing work for dynamic libraries on Windows. • Allow building GHC without GMP lib. • Cabal ...
  28. [28]
    GHC Infrastructure Update — The Glasgow Haskell Compiler
    Apr 3, 2019 · By early November 2018 there was consensus to move ahead with a migration to move GHC to GitLab. ... ghc/ghc as GHC's official upstream source ...
  29. [29]
    GHC LTS Releases — The Glasgow Haskell Compiler
    GHC will continue to release new major non-lts releases on a ~6 Month cadence. We expect to cut back on the lifetime of these releases slightly, dedicating the ...
  30. [30]
    Reflections on GHC's release schedule - Haskell.org
    Aug 1, 2017 · Release, Date, Time to next major release. 6.12.1, mid December 2009. 12 months. 7.0.1, mid November 2010. 9.5 months.
  31. [31]
    Deprecation of 32-bit Darwin and Windows platforms - Haskell.org
    In 2020, Microsoft formally discontinued new 32-bit Windows 10 for OEM distributions, which is in line with its hardware requirements for Windows 11.
  32. [32]
    Haskell Ecosystem Support Packages - Well-Typed
    Well-Typed's Haskell Ecosystem Support Packages provide commercial users with access to Well-Typed's experts while investing in the Haskell community.Missing: Prime | Show results with:Prime
  33. [33]
  34. [34]
    [PDF] Simple Unification-based Type Inference for GADTs
    The main shortcoming of our imple- mentation in GHC is that the interaction between GADTs and type classes is not dealt with properly. We plan to address ...
  35. [35]
    The new GHC diagnostic infrastructure - Well-Typed
    Aug 23, 2021 · TL;DR Starting from version 9.4, GHC will have a completely revamped API to deal with diagnostics (i.e. warnings or errors), ...
  36. [36]
    Wiki · Glasgow Haskell Compiler / GHC · GitLab
    **Summary of Core Optimizations (GHC Wiki)**
  37. [37]
    5.3. Optimisation (code improvement) - Haskell.org Downloads
    There are many options that affect the quality of code produced by GHC. Most people only have a general goal, something like “Compile quickly” ...
  38. [38]
    The worker/wrapper transformation | Journal of Functional ...
    The worker/wrapper transformation is a technique for changing the type of a computation, usually with the aim of improving its performance. It has been used by ...
  39. [39]
    foldr-build-notes.md · master · Glasgow Haskell Compiler / GHC wiki ...
    A2: Functions must be inlined in order to fuse. When fusion doesn't happen, this creates duplicate code, often with no benefit. In fact, it may create multiple ...
  40. [40]
    [PDF] the Spineless Tagless G-machine Version 2.5 - Microsoft
    Abstract. The Spineless Tagless G-machine is an abstract machine designed to support non- strict higher-order functional languages. This presentation of the ...Missing: GHC | Show results with:GHC
  41. [41]
    8. Profiling — Glasgow Haskell Compiler 9.15.20251107 User's Guide
    The result of which is that cost centers can inhibit core optimizations to some degree at use sites after inlining. Further there can be significant overhead ...
  42. [42]
    5.10. GHC Backends — Glasgow Haskell Compiler 9.15.20251105 ...
    You must install and have LLVM available on your PATH for the LLVM code generator to work. Specifically GHC needs to be able to call the opt and llc tools.
  43. [43]
    [PDF] An LLVM Backend for GHC
    Sep 30, 2010 · As we outlined in the previous section, GHC used to have two backends: (1) the C backend, which generates GNU C code, and. (2) the native code ...
  44. [44]
    SSA transformation for GHC's native code generator (Part 2)
    Apr 30, 2021 · NCG performs instruction selection on C– and spits out machine instructions for the selected platform. ... register allocator on SSA -form for GHC ...
  45. [45]
    A Haskell Compiler - Stanford Secure Computer Systems Group
    Started in 1989; 23 developers contributed current release (7.4, in development since Aug 6th) with over 500 commits. Pipeline of GHC. Core. We will start ...
  46. [46]
    The Glasgow Haskell Compiler and LLVM
    May 17, 2010 · Before the LLVM backend was added, GHC already supported two backends, a C code generator and a native code generator (NCG). The C code ...Missing: integration | Show results with:integration
  47. [47]
    JavaScript backend merged into GHC | IOG Engineering
    Dec 13, 2022 · GHCJS was stuck on GHC version 8.10 while the JavaScript backend follows GHC HEAD. GHCJS's incremental linking support ("base" bundles) hasn't ...
  48. [48]
    JavaScript backend has landed in GHC - Haskell Discourse
    Dec 14, 2022 · The GHCJS based JavaScript backend has landed in master: JavaScript backend merged into GHC | IOG Engineering.
  49. [49]
    [PDF] The GHC Runtime System - Edward Z. Yang
    The main garbage collection function GarbageCollect in rts/sm/GC.c proceeds (af- ter all user execution is halted) as follows: 1. Prepare all of the collected ...
  50. [50]
    Low-latency garbage collector merged for GHC 8.10 - Well-Typed
    Oct 28, 2019 · For a program to use the concurrent non-moving collector it must be compiled with GHC's -threaded flag and invoked with the +RTS -xn runtime ...
  51. [51]
    6.1.1. Controlling editions and extensions
    GHC supports multiple language editions: Haskell98, Haskell2010, GHC2021 and GHC2024. Each language edition consists of a collection of language extensions.
  52. [52]
    None
    ### Summary of Haskell 2010 Standard Features
  53. [53]
  54. [54]
  55. [55]
  56. [56]
  57. [57]
  58. [58]
    Base package - HaskellWiki - Haskell.org
    Jul 7, 2025 · The base package is shipped alongside the GHC compiler, and each GHC version requires that specific version of the base package. So to ...
  59. [59]
    testsuite · master · Glasgow Haskell Compiler / GHC · GitLab
    The testsuite can be run in a variety of 'ways'. This concept refers to different ways that GHC can compile the code. For example, using the native code ...Missing: language conformance
  60. [60]
    7.10. Pragmas - downloads for Haskell.org
    LANGUAGE pragma. This allows language extensions to be enabled in a portable way. It is the intention that all Haskell compilers support the LANGUAGE pragma ...
  61. [61]
    Use of language extensions - HaskellWiki - Haskell.org
    Jul 12, 2021 · We recommend to explicitly switch on language extensions that are needed using the LANGUAGE pragma instead of switching them on all at once using the -fglasgow ...
  62. [62]
    6.1.2. Overview of all language extensions - Haskell.org Downloads
    Overview of all language extensions¶. GHC supports these language extensions: Extension, Description. AllowAmbiguousTypes.
  63. [63]
    [PDF] Template Meta-programming for Haskell - Microsoft
    In this paper, therefore, we present the design of a compile-time meta-programming extension of Haskell, a strongly-typed, purely- functional language. The ...
  64. [64]
    [PDF] Generalized Algebraic Data Types and Object-Oriented Programming
    Oct 20, 2005 · They generalize the (type) parameterized algebraic datatypes (PADTs) of ML and Haskell by permitting value constructors to return specific, ...
  65. [65]
    Typed type-level programming in Haskell, part II: type families | blog
    Jul 6, 2010 · In 2007, along came type families. Essentially, type families allow us to write functions on types. For example, here's how we would implement ...
  66. [66]
    1 Linear Types - ghc-proposals documentation
    This proposal introduces a notion of linear function to GHC. Linear functions are regular functions that guarantee that they will use their argument exactly ...
  67. [67]
    6.4.21. Linear types — Glasgow Haskell Compiler 9.12.2 User's Guide
    Apr 6, 2021 · This extension is currently considered experimental, expect bugs, warts, and bad error messages; everything down to the syntax is subject to ...Missing: 2021 | Show results with:2021
  68. [68]
    Record Dot Syntax - ghc-proposals documentation - Read the Docs
    We propose new language extensions OverloadedRecordDot and OverloadedRecordUpdate that provide syntactic sugar to make the features introduced in the HasField ...Missing: 2023 | Show results with:2023
  69. [69]
    6.5.10. Overloaded record dot - Haskell.org Downloads
    OverloadedRecordDot is normally implemented by desugaring record . expressions to GHC.Records.getField expressions. By enabling OverloadedRecordDot and ...
  70. [70]
    stm: Software Transactional Memory - Hackage - Haskell.org
    Apr 12, 2024 · Software Transactional Memory, or STM, is an abstraction for concurrent communication. The main benefits of STM are composability and modularity.
  71. [71]
    6.15.2. Software Transactional Memory
    GHC now supports a new way to coordinate the activities of Concurrent Haskell threads, called Software Transactional Memory (STM). The STM papers are an ...
  72. [72]
    Control.Parallel.Strategies - Hackage - Haskell.org
    Parallel Evaluation Strategies, or Strategies for short, provide ways to express parallel computations. Strategies have the following key features.
  73. [73]
    [PDF] Seq no more: Better Strategies for Parallel Haskell - Simon Marlow
    Jun 14, 2010 · The par combinator introduces a potential for parallel evaluation. When par is applied to two arguments, it returns the value of its second ...
  74. [74]
    Extensions - Kowainik
    May 10, 2020 · Extensions are the opt-in solution for enabling non-standard features supported by the compiler, meaning, you need to explicitly ask the compiler to use the ...Ordinary Extensions · Haskell Language Standard... · Safe Haskell Extensions
  75. [75]
    GHC 9.10.3 download — The Glasgow Haskell Compiler
    ### Available Binary Distributions for GHC 9.10.3
  76. [76]
    platforms · Wiki · Glasgow Haskell Compiler / GHC · GitLab
    Jan 6, 2025 · I'm a bit confused why OpenBSD and DragonflyBSD are marked as Tier 2. I'm not sure if those ever had official bindists.
  77. [77]
    GHC activities report: December 2024–February 2025 - Well-Typed
    Mar 21, 2025 · This is the twenty-sixth edition of our GHC activities report, which describes the work Well-Typed are doing on GHC, Cabal, HLS and other parts of the core ...<|control11|><|separator|>
  78. [78]
    Status update: GHC on Apple M1 hardware - Haskell.org
    Mar 9, 2021 · GHC 8.10.4 solidified ARM support by revamping the runtime's treatment of memory consistency. · GHC 8.10.5 will be out in the coming weeks with ...Missing: announcement | Show results with:announcement
  79. [79]
    GHC 8.10.7 download — The Glasgow Haskell Compiler
    Aug 27, 2021 · This is a distribution for AArch64 macOS 11 or later, with support for Apple Silicon using the LLVM backend. LLVM 9 or greater is required. The ...Missing: announcement | Show results with:announcement
  80. [80]
    cross compiling · Wiki - GHC - Haskell Gitlab
    Oct 24, 2024 · The Glorious Glasgow Haskell Compiler ... cross compilation · roadmap · targets · cross compilation design · Current situation of closure of ...
  81. [81]
    Improving GHC's configuration logic and cross-compilation support ...
    Oct 2, 2023 · ghc-toolchain is a new tool for configuring toolchains and targets. It improves on GHC's existing ./configure -based configuration workflow.
  82. [82]
    A tale of Template Haskell and cross compilation - Tweag
    Nov 25, 2020 · The target platform is where we run the compiled Haskell app. When host=target, the GHC is a native GHC, otherwise it's a cross GHC. For a ...
  83. [83]
    Cross compile GHC project using aarch64-linux-gnu-ghc
    Jul 9, 2025 · GHC cross-compilers do not support TH (nor annotations) out-of-the-box. You need to build an external interpreter program (called iserv) for ...
  84. [84]
    GHC on ARM | Fun of Glasgow Haskell Compiler hacking on ARM ...
    Jan 18, 2014 · Thanks to a lot of improvements in GHC 7.6/HEAD in cross-compilation it is even possible to build GHC unregisterised cross-compiler. That's ...
  85. [85]
    GHC's wasm backend now supports Template Haskell and ghci
    Nov 21, 2024 · A summary of the current support status of Template Haskell and ghci in GHC's wasm backend, explaining how it's implemented and laying out ...
  86. [86]
    1.4. Release notes for version 6.0 - Haskell.org Downloads
    1.4. Release notes for version 6.0 · 1.4.1. User-visible compiler changes · 1.4.2. User-visible interpreter (GHCi) changes · 1.4.3. User-visible library changes.
  87. [87]
  88. [88]
  89. [89]
  90. [90]
  91. [91]
  92. [92]
  93. [93]
  94. [94]
  95. [95]
  96. [96]
    The Haskell Cabal | Overview
    Cabal is a system for building and packaging Haskell libraries and programs. It defines a common interface for package authors and distributors.
  97. [97]
    Welcome to the Cabal User Guide — Cabal 3.16 ... - Read the Docs
    Welcome to the Cabal User Guide · 1. How to package Haskell code · 1.1. · 2. How to deal with package source code · 2.1. · 3. How to enable collection of ...
  98. [98]
    sol/hpack: hpack: A modern format for Haskell packages - GitHub
    Hpack is a format for Haskell packages. It is a modern alternative to the Cabal package format and follows different design principles.
  99. [99]
    stack.yaml vs a Cabal file - Haskell Stack
    Hpack is considered to have some advantages over the underlying Cabal format, which are explained its project repository. They include that the Hpack format ...
  100. [100]
    5.7. Runtime system (RTS) options - Haskell.org Downloads
    Typically GHC uses a stop-the-world copying garbage collector for all generations. This can cause long pauses in execution during major garbage collections. -- ...
  101. [101]
  102. [102]
    8. Profiling — Glasgow Haskell Compiler 9.12.2 User's Guide
    Care and feeding of your GHC User's Guide ... The result of which is that cost centers can inhibit core optimizations to some degree at use sites after inlining.
  103. [103]
    nofib - Glasgow Haskell Compiler
    Dec 17, 2018 · This is the root directory of the NoFib Haskell benchmark suite. There are currently two means of running the nofib benchmarks.Missing: speedups | Show results with:speedups
  104. [104]
    [PDF] Higher Order Patterns for Rewrite Rules - TU Delft Research Portal
    Sep 6, 2024 · Rewrite rules power GHC's state of the art list fusion optimization and are also applicable in many other applications. For example, GHC itself ...<|separator|>
  105. [105]
    Linear types make performance more predictable - Tweag
    Mar 13, 2017 · In this blog post, we'll briefly discuss (more in the paper) how we're trying to achieve more predictable performance at a smaller memory footprint in Haskell.
  106. [106]
    [PDF] Linear Haskell - arXiv
    Nov 8, 2017 · Linear type systems have a long and storied history, but not a clear path forward to integrate with existing.
  107. [107]
    [PDF] Haskell vs. F# vs. Scala:
    Jun 10, 2012 · For comparable implementations in Scala and F# we achieve speedups of 4.51 (on 8 cores) and 2.28 (on 4 cores), respectively.
  108. [108]
  109. [109]
  110. [110]
  111. [111]
    xmonad: A tiling window manager - Hackage - Haskell.org
    Feb 3, 2024 · XMonad is a tiling window manager for X11. Windows are arranged automatically to tile the screen without gaps or overlap, maximising screen use.Missing: Pandoc | Show results with:Pandoc
  112. [112]
    Which monads Haskell developers use: An exploratory study
    Jan 1, 2021 · In total we processed 85135 packages or, equivalently, 16491 whole-packages from Hackage. In terms of modules, this amounts to 5842979 provided ...
  113. [113]
    Limiting GHC's memory usage - haskell - Stack Overflow
    Dec 28, 2016 · Is there a way to limit ghc's memory usage during compilation, without compromising code quality? I am on a 2GB machine, and it literally halts ...Haskell (ghc) runtime memory usage or what do I do wrongIs there a reason my Haskell program uses so much memory?More results from stackoverflow.com
  114. [114]
    Fully static Haskell executables - overview issue #43795 - GitHub
    Jul 18, 2018 · Statically linked executables can start faster than dynamically linked ones where dynamic linking has to be performed at startup (of course ...
  115. [115]
    Improvements to memory usage in GHC 9.2 - Well-Typed
    Mar 26, 2021 · In this post I explained the new GHC option -Fd and how it can be configured to return additional memory to the OS during idle periods.Missing: challenges | Show results with:challenges