File tree 2 files changed +15
-1
lines changed
2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1
1
name = " DynamicPPL"
2
2
uuid = " 366bfd00-2699-11ea-058f-f148b4cae6d8"
3
- version = " 0.36.1 "
3
+ version = " 0.36.2 "
4
4
5
5
[deps ]
6
6
ADTypes = " 47edcb42-4c32-4615-8424-f2b9edc5f35b"
Original file line number Diff line number Diff line change @@ -817,3 +817,17 @@ function prefix_cond_and_fixed_variables(
817
817
context, prefix_cond_and_fixed_variables (childcontext (context), prefix)
818
818
)
819
819
end
820
+
821
+ _pretty (ctx:: AbstractContext ) = split (string (ctx), " Context" )[1 ]
822
+ """
823
+ show_stack(ctx::AbstractContext)
824
+
825
+ Return a minimalistic string representation of the context stack `ctx`. Useful
826
+ for debugging complicated context problems, e.g. with submodels.
827
+
828
+ For example, `SamplingContext(ConditionContext(..., DefaultContext())` will
829
+ print as `Sampling->Condition->Default`.
830
+ """
831
+ show_stack (ctx:: AbstractContext ) = show_stack (NodeTrait (ctx), ctx)
832
+ show_stack (:: IsLeaf , ctx) = _pretty (ctx)
833
+ show_stack (:: IsParent , ctx) = _pretty (ctx) * " ->" * show_stack (childcontext (ctx))
You can’t perform that action at this time.
0 commit comments