We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d017e4b commit f4d4fbfCopy full SHA for f4d4fbf
src/pobserve_macro.jl
@@ -64,12 +64,12 @@ function process_tilde_statements(expr::Expr)
64
# TODO: We should probably perform some checks to make sure that this
65
# indeed was meant to be an observe statement.
66
@gensym left
67
- e = [
68
- :($left = $(esc(lhs))),
69
- :($loglike += $(Distributions.logpdf)($(esc(rhs)), $left)),
70
- ]
71
- is_last && push!(e, :(($left, $loglike)))
72
- e
+ e = quote
+ $left = $(esc(lhs))
+ $loglike += $(Distributions.logpdf)($(esc(rhs)), $left)
+ end
+ is_last && push!(e.args, :(($left, $loglike)))
+ e.args
73
elseif @capture(stmt, lhs_ .~ rhs_)
74
@gensym val
75
e = [
0 commit comments