Valid-expr-option
Validate an optional expression.
- Signature
(valid-expr-option expr? table ienv)
→
(mv erp new-expr? type? return-types new-table)
- Arguments
- expr? — Guard (expr-optionp expr?).
- table — Guard (valid-tablep table).
- ienv — Guard (ienvp ienv).
- Returns
- erp — Type (maybe-msgp erp).
- new-expr? — Type (expr-optionp new-expr?).
- type? — Type (type-optionp type?).
- return-types — Type (type-setp return-types).
- new-table — Type (valid-tablep new-table).
If there is no expression,
we return nil as the optional type,
we return the empty set of return types,
and the validation table unchanged.