
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.
20 lines
480 B
Racket
20 lines
480 B
Racket
#;
|
|
(exn-pred #rx"unit depends on initialization of later unit")
|
|
#lang typed/racket
|
|
|
|
;; This program errors at compile time, but the check is from
|
|
;; the untyped implementation of define-values/invoke-unit/infer
|
|
|
|
(define-signature s^ ([a : Integer]))
|
|
(define-signature t^ ([b : Integer]))
|
|
(define-unit u@
|
|
(import s^)
|
|
(export t^)
|
|
(init-depend s^)
|
|
(define b a))
|
|
(define-unit v@
|
|
(import)
|
|
(export s^)
|
|
(define a 2))
|
|
(define-values/invoke-unit/infer (export) (link u@ v@))
|