Skip to content

Commit 5c355b7

Browse files
committed
Rename tilde generation metafunctions
1 parent 7b4e3cd commit 5c355b7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/compiler.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -404,21 +404,21 @@ function replace_tilde!(model_info)
404404
ex = model_info[:main_body]
405405
ex = MacroTools.postwalk(ex) do x
406406
if @capture(x, @M_ L_ ~ R_) && M == Symbol("@__dot__")
407-
dot_tilde(L, R, model_info)
407+
generate_dot_tilde(L, R, model_info)
408408
else
409409
x
410410
end
411411
end
412412
$(VERSION >= v"1.1" ? "ex = MacroTools.postwalk(ex) do x
413413
if @capture(x, L_ .~ R_)
414-
dot_tilde(L, R, model_info)
414+
generate_dot_tilde(L, R, model_info)
415415
else
416416
x
417417
end
418418
end" : "")
419419
ex = MacroTools.postwalk(ex) do x
420420
if @capture(x, L_ ~ R_)
421-
tilde(L, R, model_info)
421+
generate_tilde(L, R, model_info)
422422
else
423423
x
424424
end
@@ -429,12 +429,12 @@ end
429429
""" |> Meta.parse |> eval
430430

431431
"""
432-
tilde(left, right, model_info)
432+
generate_tilde(left, right, model_info)
433433
434434
The `tilde` function generates `observe` expression for data variables and `assume`
435435
expressions for parameter variables, updating `model_info` in the process.
436436
"""
437-
function tilde(left, right, model_info)
437+
function generate_tilde(left, right, model_info)
438438
arg_syms = Val((model_info[:arg_syms]...,))
439439
model = model_info[:main_body_names][:model]
440440
vi = model_info[:main_body_names][:vi]
@@ -478,11 +478,11 @@ function tilde(left, right, model_info)
478478
end
479479

480480
"""
481-
dot_tilde(left, right, model_info)
481+
generate_dot_tilde(left, right, model_info)
482482
483483
This function returns the expression that replaces `left .~ right` in the model body. If `preprocessed isa VarName`, then a `dot_assume` block will be run. Otherwise, a `dot_observe` block will be run.
484484
"""
485-
function dot_tilde(left, right, model_info)
485+
function generate_dot_tilde(left, right, model_info)
486486
arg_syms = Val((model_info[:arg_syms]...,))
487487
model = model_info[:main_body_names][:model]
488488
vi = model_info[:main_body_names][:vi]
@@ -627,4 +627,4 @@ end
627627
Get the specialized version of type `T` for sampler `spl`. For example,
628628
if `T === Float64` and `spl::Hamiltonian`, the matching type is `eltype(vi[spl])`.
629629
"""
630-
function get_matching_type end
630+
function get_matching_type end

0 commit comments

Comments
 (0)