allow macro definition from imports and functions
add some assertions to macro resolution