jackfirth / rebellion

A collection of core libraries for Racket
https://pkgs.racket-lang.org/package/rebellion
Apache License 2.0
82 stars 16 forks source link

Data type guards #42

Open jackfirth opened 5 years ago

jackfirth commented 5 years ago

Analogous to struct-guard/c, there should be xxx-guard/c contract combinators for use with each kind of type in rebellion/type. They should provide APIs similar to the constructors of the kind of types they're meant for. Subtasks:

jackfirth commented 5 years ago

Notes on API designs currently being explored:

jackfirth commented 5 years ago

Combined with #177, this would allow deleting a ton of the boilerplate associated with defining and providing a non-generic data type. Candidates within rebellion include:

jackfirth commented 5 years ago

The API for this seems mostly designed for now, see the three subtasks.