packages feed

c-expr-dsl-0.1.0.1: CHANGELOG.md

# Revision history for `c-expr-dsl`

## 0.1.0.1 -- 2026-07-22

### Bug fixes

* Add a file, which is required by the test suite, to the tarball.

## 0.1.0.0 -- 2026-07-14

### Breaking changes

* `CheckedMacroTypeExpr` is renamed to `TypecheckedMacroTypeExpr` and gains
  `Foldable` and `Traversable` instances.
* `CheckedMacroValueExpr` is renamed to `TypecheckedMacroValueExpr` and gains
  `Functor`, `Foldable`, and `Traversable` instances.
* `TypeSource` is renamed to `CTypeSource`; its constructors `TypeSourceTypedef`
  and `TypeSourceMacroType` are renamed to `FromTypedef` and `FromMacroType`.
* Re-export parse-related symbols from `C.Expr.Parse`; demote lower-level
  modules to `other-modules`.
* Re-export typecheck-related symbols from `C.Expr.Typecheck`; demote
  `C.Expr.Typecheck.Expr` to `other-modules`; `C.Expr.Typecheck.Type` is still
  an exposed module.
* `Expr` and `Term` gain a `ctx :: Ctx` type index (from `debruijn`) for
  the local macro parameter scope. `Macro.macroArgs :: [Name]` is replaced
  by an existential `macroParams :: Vec ctx Name`; `macroExpr` becomes
  `Expr ctx Ps`. `sameMacro` compares macros structurally, ignoring location.
* `TypeTagged !TagKind !Name` is now a separate `Literal` constructor
  instead of a `TypeLit` variant.
* Some macros that were previously erroneously parsed as function-like are now
  parsed as object-like. See [PR #1990][pr-1990].
* Remove the `sameMacro` function. See [PR #1983][pr-1983].
* `CharLiteral.charLiteralValue` is now `CChar`; multi-character constants and
  numeric escapes wider than a single byte are rejected during parsing.
* `StringLiteral.stringLiteralValue` is now a strict `ByteString` holding the
  UTF-8 execution-encoding bytes (previously `[CharValue]`, then `ByteArray`).
* Rename `C.Expr.Syntax.Literals` to `C.Expr.Syntax.Literal`.
* Rename `Name` to `Identifier` (module `C.Expr.Syntax.Identifier`). The new
  `Name` (module `C.Expr.Syntax.Name`) distinguishes ordinary names
  (`NameOrdinary`) from tagged-type names (`NameTagged Identifier TagKind`).
  Tagged types now parse as `Var` nodes rather than `TypeTagged` literals.
* The `Ps` pass gains an annotation type parameter (`Ps ann`); `XVar (Ps ann)`
  carries a per-variable annotation. The `Tc` pass fixes its annotation to
  `Maybe QuantTy`.
* `tcMacros` no longer takes a typedef set or the `injectType`, `injectValue`,
  and `injectTaggedType` callbacks. It now takes a single
  `ann -> Maybe QuantTy` projection mapping each variable's parse annotation to
  its type (`Nothing` falls back to previously-typechecked macros). Accordingly,
  `CTypeSource`, `buildTypedefEnv`, and the `MacroTcInjectError` result
  constructor are removed.

### New features

* Parse macro types in addition to expressions; defer the type-vs-value
  distinction to the typechecking phase. See [PR #1862][pr-1862].
* Add test suite covering the parser (token-based and real-world libclang
  tests) and the typechecker. See [PR #1862][pr-1862].
* Local macro parameters in function-like macros are resolved to de Bruijn
  indices (`LocalParam (Idx ctx)`) at parse time, distinguishing them from
  free variables (`Var`).
* `tcMacro` now rejects type-like macros that expand to an incomplete type
  (`void` or `const void` at the top level) with a new `TcIncompleteTypeMacro`
  error. Pointer-to-incomplete types (e.g. `void *`) are still accepted.
* Support multi-line macro definitions. See [PR #1993][pr-1993].

### Minor changes

* New unit test suite `Test.CExpr.Parse.Literal` covering all character and
  string literal forms, escape sequences, and rejection cases.

### Bug fixes

* In accordance with the C reference, parse macros only as function-like when
  there is no whitespace between the macro name and the opening parenthesis of
  the parameter list. See [PR #1990][pr-1990].

[pr-1862]: https://github.com/well-typed/hs-bindgen/pull/1862
[pr-1983]: https://github.com/well-typed/hs-bindgen/pull/1983
[pr-1990]: https://github.com/well-typed/hs-bindgen/pull/1990
[pr-1993]: https://github.com/well-typed/hs-bindgen/pull/1993

## 0.1.0-alpha -- 2026-02-06

* Release candidate.