inference-aware macros

The quality of this commit is very low, even by the standards of the
experimental branch. Expect the API and the implementations to be
reviewed in the upcoming days.