Skip to content

Commit 6f15c32

Browse files
committed
export for compat and make errors runtime rather than parsetime
1 parent 7e56bae commit 6f15c32

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/DynamicPPL.jl

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,23 +129,26 @@ export AbstractVarInfo,
129129
@submodel,
130130
value_iterator_from_chain,
131131
check_model,
132-
check_model_and_trace
132+
check_model_and_trace,
133+
# Deprecated.
134+
@logprob_str,
135+
@prob_str
133136

134137
# Reexport
135138
using Distributions: loglikelihood
136139
export loglikelihood
137140

138141
# TODO: Remove once we've updated tutorials, etc.
139142
macro logprob_str(str)
140-
return error(
143+
return :(error(
141144
"The `@logprob_str` macro is no longer supported. See https://turinglang.org/dev/docs/using-turing/guide/#querying-probabilities-from-model-or-chain for information on how to query probabilities, and https://github.com/TuringLang/DynamicPPL.jl/issues/356 for information regarding its removal.",
142-
)
145+
))
143146
end
144147

145148
macro prob_str(str)
146-
return error(
149+
return :(error(
147150
"The `@prob_str` macro is no longer supported. See https://turinglang.org/dev/docs/using-turing/guide/#querying-probabilities-from-model-or-chain for information on how to query probabilities, and https://github.com/TuringLang/DynamicPPL.jl/issues/356 for information regarding its removal.",
148-
)
151+
))
149152
end
150153

151154
# Used here and overloaded in Turing

0 commit comments

Comments
 (0)