Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions docs/src/varname.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ vn_conc = concretize(vn_dyn, x)

```@docs
concretize
concretize_top_level
```

## Optics
Expand Down
1 change: 1 addition & 0 deletions src/AbstractPPL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export AbstractOptic,
getsym,
getoptic,
concretize,
concretize_top_level,
is_dynamic,
@varname,
varname,
Expand Down
2 changes: 0 additions & 2 deletions src/varname/optic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)...)
Expand Down