rebellion
rebellion copied to clipboard
Add data type guards
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.
I think all of the @racket
-referenced identitiers are bound, at least, building the docs doesn't cause any errors with them.
Just stumbled onto this and just wandering what the status is? It would be a nice feature to have.