typed-racket/typed-racket-test/succeed/unsafe-provide-struct.rkt
Asumu Takikawa eb90cd4e8c Add a typed/racket/unsafe library.
Comes with `unsafe-require/typed` and `unsafe-provide`.
These operations do not generate contracts but are not
exported by default by Typed Racket.
2015-09-29 18:48:08 -04:00

16 lines
400 B
Racket

#lang racket/base
;; Test unsafe provide with a struct
(module a racket/base
(struct foo (x y))
(define a-foo (foo 1 2))
(provide (struct-out foo) a-foo))
(module b typed/racket
(require typed/racket/unsafe)
(unsafe-provide (struct-out foo))
(unsafe-require/typed (submod ".." a)
[#:struct foo ([x : String] [y : String])]
[a-foo foo]))