Alexander D. Knauth
2015-02-22 19:43:02 UTC
Using #:omit-define-syntaxes doesn’t work because then when other modules import it it forgets about the type:
def.rkt:
#lang typed/racket
(provide x)
(define-type x 'x #:omit-define-syntaxes)
(define x : x 'x)
ref.rkt:
#lang typed/racket
(require "def.rkt")
x ; works fine, outputs 'x
(define y : x x) ; Type Checker: parse error in type; type name `x' is unbound in: x
Why doesn’t this work, and is there another way to do this?
____________________
Racket Users list:
http://lists.racket-lang.org/users
def.rkt:
#lang typed/racket
(provide x)
(define-type x 'x #:omit-define-syntaxes)
(define x : x 'x)
ref.rkt:
#lang typed/racket
(require "def.rkt")
x ; works fine, outputs 'x
(define y : x x) ; Type Checker: parse error in type; type name `x' is unbound in: x
Why doesn’t this work, and is there another way to do this?
____________________
Racket Users list:
http://lists.racket-lang.org/users