BHC v0.2.2
The first release of 2026 with material progress against
real-world Haskell. v0.2.2 is a stability-and-coverage release —
the headline numbers move, the REPL becomes booth-usable, and the
release tarball finally ships the standard library it needs to
link a hello-world.
Highlights
- Pandoc —
bhc check: 78 / 221 modules pass (up from
4 / 221 at v0.2.1).
The parser sees all 221 modules; 91 still fail in lowering or
type-checking and 52 are skipped pending external-package support.
Live numbers on the status page. zentinel-agent-policy— 10 / 10 modules compile. The full
Zentinel.Agent.Policy.*graph goes through the multi-module
pipeline and emits object code. See
the milestone post.bhciREPL is now usable. Pure-expression evaluation, recursive
let, persistent bindings, list comprehensions, polymorphic
arithmetic, accurate type display. See the
REPL section in the demos folder.- Install path repaired. v0.2.1 tarballs shipped without the
standard library, socurl install.sh | shleft users one
hello-world away from a link error. Fixed.
What got better
Language coverage
- Multi-module pipeline with cross-module type propagation, circular
imports, qualified-name resolution, re-export handling, and ~120
builtin module stubs (Data.Text, transformers, ByteString, Map, Set,
Sequence, Djot, Skylighting, DocLayout, and more). - Existential types end-to-end (parser → typechecker → codegen with
dictionary dispatch). - Multi-argument class methods, RankNTypes, multi-line export
lists, alias-qualified imports. - Layout rule edge cases:
VirtualRBracebeforein, qualified
constructors at the start of pattern bindings, multi-line Haddock
collection. - Parser correctness fixes: backtick infix precedence,
!/?/#
as binary operators, Haddock comments before module, tuple
constructors up to 15-tuples, char literal lexing, nestedwhere
clauses, parameterised CPP/diagnostics in the loader.
Evaluator
/=was an alias for==and returned wrong results everywhere it
appeared in source. Now properly negates equality.+,-,*,negatewere hardcoded to integer arithmetic; calling
them onFloatorDoubleeither errored or silently returned 0.
Now polymorphic acrossInt,Integer,Float,Double.- REPL
letdispatch no longer misrouteslet f n = ... in f 5as a
binding declaration. - Type display in
bhcino longer printst586for unresolved
schemes; falls back to the runtime value shape and recurses into
lists, tuples,Maybe, andEither.
Packaging
- Release tarball now contains all nine stdlib static libraries
(libbhc_text.a,libbhc_base.a,libbhc_prelude.a, ...) in
addition tolibbhc_rts.a. Sizes up from ~39 MB to ~96 MB
compressed; the alternative was broken installs. - Workflow fails loudly if any of the four critical archives (rts,
text, base, prelude) is missing.
Compatibility
This release stays within the documented Haskell baseline. The
compatibility charter covers
the GHC2021 / GHC2024 subset BHC currently supports. Template Haskell
remains out of scope.
Known issues
A few rough edges are documented honestly rather than hidden:
let t = expr; describe tinside adoblock routes user class
methods through an RTS stub instead of dispatching on the
user-supplied instance. Workaround: invoke the class method on the
value directly, or via a top-level binding. Will be fixed in the
next release.- Recursive
where-bound helpers with guards can segfault under
native compilation in some shapes. Workaround: hoist the helper to a
top-level function. - WebAssembly binaries validate against
wasmtimebut the Core IR
→ WASM lowering for general programs is incomplete. WASM E2E tests
are 0 / 6. - GPU backends pass mock-mode tests (2 / 2 PTX) but require CUDA
hardware for real end-to-end testing.
Installation
# Recommended (Linux / macOS):
curl -fsSL https://arcanist.sh/bhc/install.sh | sh
# Or via Homebrew:
brew install arcanist-sh/tap/bhc
# Then:
echo 'main = putStrLn "Hello!"' > hello.hs
bhc hello.hs -o hello
./helloPlatforms
This release includes binaries for:
- Linux x86_64
- macOS aarch64 (Apple Silicon)
Linux aarch64, macOS x86_64 (Intel), and Windows are not yet packaged.
Checksums
See SHA256SUMS.txt for file checksums.
Coming up
The next release will focus on type-checking failures in modules that
currently cross lowering but stall on partial stub typing, and on the
two native-codegen bugs noted above. Pandoc compatibility numbers will
keep moving as those land.