typed-racket/typed-racket-test/fail/unit-ctc-init-depends.rkt
Daniel Feltey 2e0cc095c7 Initial support for typed units in typed racket.
Most unit forms are supported, including most of the "infer" forms that
infer imports/exports/linkages from the current context.

Notably, none of the structural linking forms for units are supported, and
`define-unit-binding` is also currently unsupported.
2015-09-10 16:32:11 -05:00

25 lines
476 B
Racket

#;
(exn-pred #rx"x@: broke its own contract;\n contract does not list initialization dependency x\\^")
#lang racket
(module untyped racket
(provide x^ x@)
(define-signature x^ (x))
(define x@
(unit
(import x^)
(export)
(init-depend x^)
x)))
(module typed typed/racket
(require/typed (submod ".." untyped)
[#:signature x^ ([x : Integer])]
[x@ (Unit (import x^)
(export)
Integer)]))
(require 'typed)