High-level constructor for an vl-echar-p.
(vl-echar char loc) → echar
See make-vl-echar-fast for a faster alternative.
Function:
(defun vl-echar (char loc) (declare (xargs :guard (and (characterp char) (vl-location-p loc)))) (let ((__function__ 'vl-echar)) (declare (ignorable __function__)) (b* (((vl-location loc) loc)) (vl-echar-raw loc.filename (vl-echarpack (the (unsigned-byte 8) (char-code char)) loc.line loc.col)))))
Theorem:
(defthm vl-echar-p-of-vl-echar (b* ((echar (vl-echar char loc))) (vl-echar-p echar)) :rule-classes :rewrite)
Theorem:
(defthm vl-echar-of-char-fix-char (equal (vl-echar (char-fix char) loc) (vl-echar char loc)))
Theorem:
(defthm vl-echar-chareqv-congruence-on-char (implies (chareqv char char-equiv) (equal (vl-echar char loc) (vl-echar char-equiv loc))) :rule-classes :congruence)
Theorem:
(defthm vl-echar-of-vl-location-fix-loc (equal (vl-echar char (vl-location-fix loc)) (vl-echar char loc)))
Theorem:
(defthm vl-echar-vl-location-equiv-congruence-on-loc (implies (vl-location-equiv loc loc-equiv) (equal (vl-echar char loc) (vl-echar char loc-equiv))) :rule-classes :congruence)