Skip to content

Commit d92141c

Browse files
committed
added @returned_quantities macro taking two arguments + removed
`returned_quantities` from exported functions
1 parent 5ee727b commit d92141c

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/DynamicPPL.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ export AbstractVarInfo,
8686
Model,
8787
getmissings,
8888
getargnames,
89-
returned_quantities,
9089
extract_priors,
9190
values_as_in_model,
9291
# Samplers

src/model.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,3 +1248,15 @@ end
12481248
function returned_quantities(model::Model, values, keys)
12491249
return returned_quantities(model, NamedTuple{keys}(values))
12501250
end
1251+
1252+
"""
1253+
@returned_quantities(model, input)
1254+
1255+
Execute `model` and extract the return-values of `model` for `input`.
1256+
1257+
!!! note
1258+
This macro is in fact a simple wrapper around the method [`DynamicPPL.returned_quantities`](@ref).
1259+
"""
1260+
macro returned_quantities(model_expr, input_expr)
1261+
return :($returned_quantities($(esc(model_expr)), $(esc(input_expr))))
1262+
end

0 commit comments

Comments
 (0)