probcomp / Gen.jl

A general-purpose probabilistic programming system with programmable inference
https://gen.dev
Apache License 2.0
1.79k stars 160 forks source link

Allow full Julia syntax for arguments in Static & Dist DSL #301

Open georgematheos opened 4 years ago

georgematheos commented 4 years ago

Currently, I get errors if I try using the following syntactic constructions to declare static generative functions and dist DSL distributions:

@gen (static) function foo(_)
@gen (static) function foo(::Typename)
@gen (static) function foo(_::Typename)
@dist foo(::Typename)

Ideally we would support all of these.

ztangent commented 4 years ago

This should be a relatively easy fix if you want to take a stab at it! We just have to gensym the argument names.