I looked in psyntax.scm, I should be able to add some extra fields to the tree-il representation as you wish.
I will have a try of it


>I think that what I'm primarily interested in is a way to annotate
tree-il with type information, which the compiler may use to generate
more efficient code.  However I think it's premature to bless a
particular encoding of that information in Scheme, or any particular
type system... basically it should be a field in the tree-il, I think,
and anything else can be built on top of that.

MHO anyway :)  But yes, there is a lot to learn from Racket about this.
They've done the most advanced work that I'm aware of.

Andy
--
http://wingolog.org/