Using term_expansion to create new source code file

Hello,

Is it possible to capture the resulting source into a file, that is generated by the compiler, after it applies term (and goal) expansion?

I couldn’t see something like this in the documentation …

thanks,

Dan

Not exactly what you’re asking for, but for simple inspecting the resulting code you can always use listing(Predicate) in REPL.

Thank you.

Yes, makes sense that a listing would show the actually compiled code.

Better to have a changed source file – but, perhaps this is too much to ask for in a compiler – to reproduce the source file with changes – although, it would be really cool to have.

Dan

Thanks.

I guess this wouldn’t keep the formatting and comments in the file.

Dan