diff --git a/developers/compiler/minituring-compiler/index.qmd b/developers/compiler/minituring-compiler/index.qmd index c22894b17..0ac5ab9b5 100755 --- a/developers/compiler/minituring-compiler/index.qmd +++ b/developers/compiler/minituring-compiler/index.qmd @@ -270,7 +270,18 @@ We define the probabilistic model: end; ``` -We perform inference with data `x = 3.0`: +The `@mini_model` macro expands this into another function, `m`, which effectively calls either `assume` or `observe` on each variable as needed: + +```{julia} +@macroexpand @mini_model function m(x) + a ~ Normal(0.5, 1) + b ~ Normal(a, 2) + x ~ Normal(b, 0.5) + return nothing +end +``` + +We can use this function to construct the `MiniModel`, and then perform inference with data `x = 3.0`: ```{julia} sample(MiniModel(m, (x=3.0,)), MHSampler(), 1_000_000; chain_type=Chains, progress=false)