bennn / require-typed-scv

Typed Racket's `require/typed`, with soft contract verification
Other
1 stars 0 forks source link

Redesign API for convenience #11

Open bennn opened 6 years ago

bennn commented 6 years ago

The current API is:

This is nice, but makes it hard to use Typed Racket to handle define-type and generate contracts. Those actions require the type checker's "global" context, but a local require/typed/scv can't get access to that.


Alternate API

So it's very clearly a pre-processor, and you're not running SCV every time you raco make, and it re-uses the important parts of Typed Racket without any changes to Typed Racket.

OH BY THE WAY the generated FILE2.rkt should have a checksum for the untyped file it depends on. That would be very cool and useful.