
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.
18 lines
362 B
Racket
18 lines
362 B
Racket
#lang racket
|
|
|
|
(module typed typed/racket
|
|
(provide (all-defined-out))
|
|
(define u
|
|
(unit (import)
|
|
(export)
|
|
(values (lambda ([x : String]) x)
|
|
(lambda ([n : Integer]) (sqr n))))))
|
|
|
|
(module untyped racket
|
|
(require (submod ".." typed))
|
|
(define-values (f g) (invoke-unit u))
|
|
(f "string")
|
|
(g 5))
|
|
|
|
(require 'untyped)
|