bennn / require-typed-scv

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

Convert #:struct to struct/c #5

Closed bennn closed 7 years ago

bennn commented 7 years ago
  1. parse the #:struct option from require/typed
  2. generate a struct/c contract

If there's a Typed Racket type that corresponds to struct/c, use that. Otherwise just use struct/c and make sure that fake-types.rkt exports struct/c (without renaming).

Do not turn a #:struct into a plain recursive type, because it would be bad for fake-types.rkt to interpret all recursive types as describing structs. (Hope that makes sense to you, future Ben.)

bennn commented 7 years ago

a552dd3da9766e1290357c771f9f3c4ae1a0e497

Turns #:struct into a struct clause for contract-out