Use new parameter/c argument for contract generation

Closes PR 13446

original commit: 4b279eaf6a71017733888bc5df3a6b95bfe4d082
This commit is contained in:
Asumu Takikawa 2013-01-23 14:38:17 -05:00
parent 7466f47f33
commit 0e1f460ae8
2 changed files with 13 additions and 1 deletions

View File

@ -0,0 +1,12 @@
#;
(exn-pred #rx"blaming: top-level")
#lang racket/load
(module a typed/racket
(provide p)
(: p (Parameterof String Index))
(define p (make-parameter 0 string-length)))
(require 'a)
(p 0)

View File

@ -422,7 +422,7 @@
;; TODO Is this sound?
[(Param: in out)
(set-impersonator!)
#`(parameter/c #,(t->c out))]
#`(parameter/c #,(t->c in) #,(t->c out))]
[(Hashtable: k v)
(when (equal? kind flat-sym) (exit (fail)))
#`(hash/c #,(t->c k #:kind chaperone-sym) #,(t->c v) #:immutable 'dont-care)]