trying to understand intermediate.ml; sketched out our versions of ir_variables but not sure about some of the return types