[plt-scheme] Typed Scheme misses some contract definition?
Hi all,
Assume I define test.scm:
#lang typed-scheme
(provide (struct-out foo))
(define-struct: foo
((v : Integer)))
I open another file xxx.scm:
#lang typed-scheme
(: v Integer)
(define v 10)
and I run it.
On the interactions:
Welcome to DrScheme, version 4.1.5.3-svn26mar2009 [3m].
Language: Module; memory limit: 1024 megabytes.
> (make-foo v)
. typecheck: unbound identifier make-foo in: make-foo
> (require "test.scm")
> (make-foo v)
- : foo2
#<foo>
However, If I add a require line to xxx.scm:
#lang typed-scheme
(require "test.scm")
(: v Integer)
(define v 10)
interactions is now:
Welcome to DrScheme, version 4.1.5.3-svn26mar2009 [3m].
Language: Module; memory limit: 1024 megabytes.
> (make-foo v)
. typecheck: unbound identifier contract/proc in: (make-foo v)
> (require "test.scm")
> (make-foo v)
. typecheck: unbound identifier contract/proc in: (make-foo v)
>
I don't know how typed-scheme works internally but I guess that the
require line screws something up?
Cheers,
--
Paulo Jorge Matos - pocmatos at gmail.com
Webpage: http://www.personal.soton.ac.uk/pocm