[racket] is there a version of syntax/parse that works with typed racket?

From: Alexander D. Knauth (alexander at knauth.org)
Date: Tue May 27 19:52:54 EDT 2014

It seems like syntax-parse is expanding into untyped code (which makes sense), and typed racket can’t type check it (which also makes sense).  And also, I can’t use require/typed to import the untyped stuff that syntax/parse uses because of lexical context and hygienic macros and all that (which also makes sense).

So is there a version of syntax/parse that expands into code that typed racket can use?

Or is there some kind of workaround?

Right now when I do something like this:
#lang typed/racket
(require syntax/parse)
(syntax-parse #'x
  [x #'x])
It gives me these errors:
. Type Checker: missing type for identifier;
 consider using `require/typed' to import it
  identifier: ps-empty
  from module: syntax/parse/private/residual in: (syntax-parse (syntax x) (x (syntax x)))
. Type Checker: missing type for identifier;
 consider using `require/typed' to import it
  identifier: syntax-patterns-fail
  from module: syntax/parse/private/residual in: (syntax-parse (syntax x) (x (syntax x)))
. Type Checker: missing type for identifier;
 consider using `require/typed' to import it
  identifier: current-syntax-context
  from module: racket/syntax in: (syntax-parse (syntax x) (x (syntax x)))
. Type Checker: expected Parameter, but got Nothing in: (syntax-parse (syntax x) (x (syntax x)))

And when I do as 3 of the error messages suggest and use require/typed, it still gives me those same errors (which makes sense because of the lexical context and hygienic macros and all that).  
#lang typed/racket

(require syntax/parse)

(require/typed syntax/parse/private/residual
               [ps-empty Any]
               [syntax-patterns-fail Any])
(require/typed racket/syntax
               [current-syntax-context (Parameterof (U Syntax #f))])

(syntax-parse #'x
  [x #'x])


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140527/77d26023/attachment.html>

Posted on the users mailing list.