(vl-indent n &key (ps 'ps)) indents to column
(vl-indent n &key (ps 'ps)) → ps
In text mode we indent by printing spaces; in HTML mode we instead
print
Function:
(defun vl-indent-fn (n ps) (declare (xargs :stobjs (ps))) (declare (xargs :guard (natp n))) (declare (type unsigned-byte n)) (let ((__function__ 'vl-indent)) (declare (ignorable __function__)) (b* ((rchars (vl-ps->rchars)) ((the unsigned-byte col) (vl-ps->col)) (htmlp (vl-ps->htmlp)) ((the unsigned-byte n) (lnfix n))) (cond ((>= col n) ps) (htmlp (vl-ps-seq (vl-ps-update-rchars (make-list-ac (- n col) " " rchars)) (vl-ps-update-col n))) (t (vl-ps-seq (vl-ps-update-rchars (make-list-ac (- n col) #\Space rchars)) (vl-ps-update-col n)))))))
Theorem:
(defthm vl-indent-fn-of-nfix-n (equal (vl-indent-fn (nfix n) ps) (vl-indent-fn n ps)))
Theorem:
(defthm vl-indent-fn-nat-equiv-congruence-on-n (implies (acl2::nat-equiv n n-equiv) (equal (vl-indent-fn n ps) (vl-indent-fn n-equiv ps))) :rule-classes :congruence)