[racket] TR requite/typed syntax error

From: Ray Racine (ray.racine at gmail.com)
Date: Sun Oct 28 01:52:40 EDT 2012

While the exact typing isn't quite right yet, the following added to the
end of /collects/typed-racket/base-env/base-special-env.rkt is now giving
normal TR type check (domain mismatch) errors.  So I assume I just need to
get the signatures right.  This will put me past the show stopper problem
of the quote-module-path closing over a protected procedure.

  [(make-template-identifier 'module-path-fixup 'syntax/location)
   (->opt [(Un -Symbol -String)] (Un -Path -Symbol (-lst (Un -Symbol

  [(make-template-identifier 'variable-reference->module-source/submod
                             (-> -Variable-Reference
                                 (Un (-pair (Un -Symbol (-val #f) -Path)
                                     -Symbol (-val #f) -Path))]

But ...
While module-path-fixup is an internal method,
variable-reference->module-source/submod appears to be something that
should be publicly exposed into the base environment given the treatement
of its sibling methods.

While the siblings seem to be runtime defined internal to Racket itself,
variable-reference.../submod is defined as a regular Racket reference in
syntax/location.  I tried exporting it and then injecting it into
typed-racket/base-env/base-env.rkt through a number of tricks and treats -
no go, its always an undefined identifier.  So I punted, and ended up just
treating it strictly as a template identifier.  The above does solve my
immediate issues of making progress on TRing Places.

Once I get the signature types right I'll submit a patch.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20121028/d2f9253e/attachment-0001.html>

Posted on the users mailing list.