You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fp-library/CHANGELOG.md
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [Unreleased]
9
9
10
+
## [0.16.0] - 2026-04-14
11
+
12
+
### Added
13
+
14
+
-**Ref trait hierarchy**: `RefFunctor`, `RefSemimonad`, `RefApplicative`, `RefMonad`, `RefFoldable`, `RefFilterable`, `RefTraversable`, `RefWitherable`, `RefBifunctor`, `RefBifoldable`, `RefBitraversable`, `RefCompactable`, `RefAlt`, `RefApplyFirst`, `RefApplySecond`, and all corresponding `SendRef` and `ParRef` variants. These traits operate on borrowed containers (`&fa`) with closures that take references (`Fn(&A) -> B`).
15
+
-**Brand inference system**: `InferableBrand` traits auto-generated by `trait_kind!`/`impl_kind!` provide reverse mapping from concrete types to brands. The compiler infers brands automatically for unambiguous types (Option, Vec, etc.).
16
+
-**Val/Ref dispatch**: 19 dispatch modules in `dispatch/` unify by-value and by-reference trait methods behind a single function. The closure's argument type (owned vs borrowed) selects the appropriate trait method at compile time with zero runtime cost.
17
+
-**Inference wrapper functions**: 38 free functions (e.g., `map`, `bind`, `fold_left`, `traverse`, `contramap`) that combine brand inference with Val/Ref dispatch. Users write `map(|x: i32| x + 1, Some(5))` with no turbofish.
18
+
-**`ContravariantDispatch`**: Dispatch module for `contramap` following the same pattern as other dispatch modules (Val-only, no Ref variant).
19
+
-**Inferred mode for `m_do!`/`a_do!`**: `m_do!({ ... })` and `a_do!({ ... })` (without brand parameter) infer the brand from the first monadic expression.
20
+
-**`ref` qualifier for `m_do!`/`a_do!`**: `m_do!(ref Brand { ... })` dispatches to by-reference trait methods.
21
+
-**`FoldableWithIndex` mutual derivation**: `FoldableWithIndex` and `FnBrand`-parameterized foldable operations support mutual derivation with the base `Foldable` trait.
22
+
23
+
### Changed
24
+
25
+
-**Dispatch modules restructured**: Inference wrappers moved from `functions/*.rs` into `dispatch/*.rs` modules. Each dispatch module now contains the dispatch trait, Val/Ref impls, inference wrapper, and `mod explicit` submodule. `functions.rs` is now a facade that re-exports from `dispatch/`.
26
+
-**`explicit::contramap` signature**: Now takes 5 type parameters (`Brand, A, B, FA, Marker`) instead of 3 (`Brand, A, B`) due to the dispatch pattern. Call sites using turbofish must update from `<Brand, _, _>` to `<Brand, _, _, _, _>`.
27
+
-**Ref traits borrow containers**: Ref trait methods now take `&fa` (borrowed container) instead of owned containers. This is a breaking change for all Ref trait implementations and call sites.
28
+
-**`#[allow]` to `#[expect]`**: All lint suppression attributes converted from `#[allow]` to `#[expect]` with reason strings.
29
+
-**`RefFunctor`/`SendRefFunctor` closures**: Changed from `FnOnce` to `Fn` for consistency with the rest of the trait hierarchy.
30
+
31
+
### Removed
32
+
33
+
-**`functions/*.rs` source files**: Replaced by dispatch modules. The `functions/` directory no longer contains source files; `functions.rs` re-exports from `dispatch/`.
34
+
-**`LiftRefFn`, `RefEndofunction`, `coerce_ref_fn`**: Removed unused ref function lifting utilities.
35
+
-**Non-dispatch free functions from public API**: By-value and by-ref free functions in `classes/` that are superseded by dispatch versions are excluded from `functions` re-exports.
36
+
37
+
### Fixed
38
+
39
+
-**`ref_fold_left_with_index` argument order**: Aligned with Val variant and PureScript convention.
Copy file name to clipboardExpand all lines: fp-macros/CHANGELOG.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [Unreleased]
9
9
10
+
## [0.7.0] - 2026-04-14
11
+
12
+
### Added
13
+
14
+
-**Dispatch-aware HM signature generation**: `#[document_module]` analyzes dispatch traits (Pass 1b) and generates Hindley-Milner type signatures for inference wrapper functions by building synthetic signatures that replace dispatch machinery with semantic equivalents. Produces signatures like `forall Brand A B. Functor Brand => (A -> B, Brand A) -> Brand B`.
15
+
-**`#[document_signature]` manual override**: `#[document_signature("forall A B. (A -> B) -> A -> B")]` emits the provided string directly, bypassing the generation pipeline.
-**Inferred mode for `m_do!`/`a_do!`**: `m_do!({ ... })` infers the brand from the first monadic expression instead of requiring an explicit brand parameter.
18
+
-**`ref` qualifier for `m_do!`/`a_do!`**: `m_do!(ref Brand { ... })` generates code that dispatches to by-reference trait methods.
19
+
-**Exclusion support in `generate_function_re_exports!`**: `exclude { "module::function" }` syntax to suppress re-exports of functions superseded by dispatch versions.
20
+
-**Insta snapshot regression tests**: 19 per-file tests covering all 38 dispatch inference wrapper HM signatures, plus 14 edge case tests for unusual inputs and graceful fallback behavior.
21
+
22
+
### Changed
23
+
24
+
-**`#[document_signature]` attribute parsing**: Now accepts an optional string literal argument (previously rejected all arguments).
25
+
-**Dispatch analysis uses direct sources**: Container param mapping uses positional alignment from trait definition (not heuristic ident scanning). Brand param derived from trait definition's Kind\_\* bound (not Val impl where clause). Type param ordering follows trait definition order (not alphabetical sort). Inner Apply! macros in self-type elements resolved via `apply_worker`.
26
+
-**`m_do!`/`a_do!` codegen**: Updated to use `explicit::bind`/`explicit::map` paths instead of `bind_explicit`/`map_explicit`.
Copy file name to clipboardExpand all lines: fp-macros/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Add this to your `Cargo.toml`:
14
14
15
15
```toml
16
16
[dependencies]
17
-
fp-macros = "0.6"
17
+
fp-macros = "0.7"
18
18
```
19
19
20
20
> **Note:** If you are using [`fp-library`](https://crates.io/crates/fp-library), these macros are already re-exported at the crate root. You only need to add this dependency if you are using the macros independently.
0 commit comments