(define impc:ti:ref-check
(lambda (ast vars kts request?)
(if (not (assoc-strcmp (cadr ast) vars))
(impc:compiler:print-compiler-error "no valid local variable found in call to ref" ast))
(list (impc:ir:pointer++ (cadr (assoc-strcmp (cadr ast) vars))))))