Fix incorrect serialization of signature environment

Closes #229
This commit is contained in:
Daniel Feltey 2015-10-29 01:35:33 -05:00
parent 60c37ab2bf
commit d7ae7dbdd8
2 changed files with 16 additions and 1 deletions

View File

@ -127,8 +127,9 @@
(define ty (force (cdr id/ty)))
`(cons (quote-syntax ,id) ,(sub ty)))
m))
(define serialized-extends (and extends `(quote-syntax ,extends)))
`(make-Signature (quote-syntax ,name)
(quote-syntax ,extends)
,serialized-extends
(list ,@(serialize-mapping mapping)))]
[(arr: dom rng rest drest kws)
`(make-arr ,(sub dom) ,(sub rng) ,(sub rest) ,(sub drest) ,(sub kws))]

View File

@ -0,0 +1,14 @@
#lang typed/racket
(module a typed/racket
(provide foo^)
(define-signature foo^
([n : Number])))
(require 'a)
(define-unit foo@
(import)
(export foo^)
(define n 5))