
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.
17 lines
415 B
Racket
17 lines
415 B
Racket
#;
|
|
(exn-pred (regexp-quote "type mismatch\n expected: Integer\n given: String"))
|
|
#lang typed/racket
|
|
|
|
(require (for-syntax syntax/parse))
|
|
|
|
|
|
(unit (import)
|
|
(export)
|
|
(define-syntax (my-define stx)
|
|
(syntax-parse stx
|
|
[(_ name:id #:with-type type expr)
|
|
#'(begin
|
|
(: name type)
|
|
(define name expr))]))
|
|
(my-define bad #:with-type Integer "BAD"))
|