Attach struct info to constructor for polymorphic TR structs.

Closes PR 12806
This commit is contained in:
Eric Dobson 2012-05-31 08:47:02 -07:00 committed by Sam Tobin-Hochstadt
parent b7b566aefc
commit c2d9f7ed9a
2 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,12 @@
#lang racket/load
(module a typed/racket
(struct: (V) foo ((v : V)))
(provide foo))
(module b racket
(require 'a)
(foo 2))
(require 'b)

View File

@ -240,6 +240,7 @@
(mk/register-sty nm flds parent-name parent-field-types types
#:maker maker
#:mutable mutable
#:struct-info (syntax-property nm/par 'struct-info)
;; wrap everything in the approriate forall
#:wrapper (λ (t) (make-Poly tvars t))
#:type-wrapper (λ (t) (make-App t new-tvars #f))