(define impc:ir:compiler:ref
(lambda (ast types)
(let* ((t (assoc-strcmp (cadr ast) types)))
(if (null? t)
(impc:compiler:print-compiler-error "single argument to ref must be a valid variable"))
(impc:ir:gname (string-append (symbol->string (cadr ast)) "Ptr")
(string-append "%" (symbol->string (cadr ast)) "Ptr")
(impc:ir:get-type-str (impc:ir:pointer++ (cdr t))))
"")))