
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.
15 lines
319 B
Racket
15 lines
319 B
Racket
#;
|
|
(exn-pred #rx"u: broke its own contract\n promised: Integer")
|
|
#lang racket
|
|
|
|
(module untyped racket
|
|
(provide u)
|
|
(define u (unit (import) (export) "not an integer")))
|
|
|
|
(module typed typed/racket
|
|
(require/typed (submod ".." untyped)
|
|
[u (Unit (import) (export) Integer)])
|
|
(invoke-unit u))
|
|
|
|
(require 'typed)
|