From c43dddf496e4675afd9858ea31b75a1c3fb0e6b3 Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Sun, 18 Jan 2026 03:48:43 +0000 Subject: [PATCH] Export concretize_top_level --- HISTORY.md | 4 ++++ Project.toml | 2 +- docs/src/varname.md | 1 + src/AbstractPPL.jl | 1 + src/varname/optic.jl | 2 -- 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index de69ebe4..dda54ccf 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,7 @@ +## 0.14.1 + +Export the `concretize_top_level` function, which concretizes only the indices contained in an `AbstractPPL.Index`, and does not recurse into child optics. + ## 0.14.0 This release overhauls the `VarName` type. diff --git a/Project.toml b/Project.toml index 26ce0aa9..0fce3033 100644 --- a/Project.toml +++ b/Project.toml @@ -3,7 +3,7 @@ uuid = "7a57a42e-76ec-4ea3-a279-07e840d6d9cf" keywords = ["probablistic programming"] license = "MIT" desc = "Common interfaces for probabilistic programming" -version = "0.14.0" +version = "0.14.1" [deps] AbstractMCMC = "80f14c24-f653-4e6a-9b94-39d6b0f70001" diff --git a/docs/src/varname.md b/docs/src/varname.md index 173e078b..7895c63e 100644 --- a/docs/src/varname.md +++ b/docs/src/varname.md @@ -66,6 +66,7 @@ vn_conc = concretize(vn_dyn, x) ```@docs concretize +concretize_top_level ``` ## Optics diff --git a/src/AbstractPPL.jl b/src/AbstractPPL.jl index 349b74b5..e08ee8b4 100644 --- a/src/AbstractPPL.jl +++ b/src/AbstractPPL.jl @@ -33,6 +33,7 @@ export AbstractOptic, getsym, getoptic, concretize, + concretize_top_level, is_dynamic, @varname, varname, diff --git a/src/varname/optic.jl b/src/varname/optic.jl index 1e58ad42..48dd410a 100644 --- a/src/varname/optic.jl +++ b/src/varname/optic.jl @@ -245,8 +245,6 @@ _maybe_view(val, i...; k...) = getindex(val, i...; k...) concretize_top_level(idx::Index, val) Concretise only the indices of `idx` against `val`, leaving the child optic unconcretised. - -This function is unexported and is only used internally in `canview` (for now). """ function concretize_top_level(idx::Index, val) concretized_indices = tuple(map(Base.Fix2(_concretize_index, val), idx.ix)...)