(define impc:ir:compiler:num-of-elts
(lambda (ast types)
(let* ((t (assoc-strcmp (cadr ast) types)))
(if (or (null? t)
(and (not (impc:ir:array? (cdr t)))
(not (impc:ir:vector? (cdr t)))))
(impc:compiler:print-compiler-error "num-of-elts must take a variable of array or vector type not: " (cdr ast)))
(impc:ir:gname (number->string (cadr (cdr t))) "i64")
"")))