rebellion icon indicating copy to clipboard operation
rebellion copied to clipboard

Add data type guards

Open eutro opened this issue 3 years ago • 2 comments

Adds #:guard-maker arguments for tuple, wrapper and record types, as well as <type>-guard-maker/c macros for creating these from contracts.

Since these are all implemented in terms of just the tuple type and its guard implementation, and is also somewhat repetitive, I believe it makes most sense to have all of these in a single PR.

Implements #42, and its subtasks: #202, #203, #204.

Supercedes #512. and the same caveat applies for the <type>-guard-maker/c macros: they may not be the best for applying contracts, since the calling party is not known to the guard procedure, and thus it has to take any blame for contract violations itself.

eutro avatar Oct 05 '21 12:10 eutro

I think all of the @racket-referenced identitiers are bound, at least, building the docs doesn't cause any errors with them.

eutro avatar Oct 26 '21 05:10 eutro

Just stumbled onto this and just wandering what the status is? It would be a nice feature to have.

jmhimara avatar Jun 15 '23 23:06 jmhimara