macro for defining file scoped generator with global interface