- marked as enhancement
Expose syntax-parse/typed-syntax
It would be nice to have access to a non-definition version of define-typed-syntax
to be able to customize the input. My main reason for this is #%app
: I would like the function name to appear at the beginning of error messages, not #%app
. For that reason, I’d like to be able to write #%app
like this:
(define-syntax-parser #%app
[(_ rest ...+)
(syntax-parse/typed-syntax #'(rest ...)
#| ... |#)])
This is currently sort of possibly by cheating and using syntax-local-value
to grab the transformer procedure and calling it directly, but that’s obviously a hack. Having access to syntax-parse/typed-syntax
would be nicer.
Comments (12)
-
reporter -
repo owner Believe it or not, we haven't provided it because we couldn't agree on a good name and didnt want to commit to anything :/ Any suggestions?
-
reporter I don’t have a strong opinion, but
syntax-parse/typed
orparse-typed-syntax
both seem reasonable to me? Having “syntax” in there twice seems a little redundant, but I wouldn’t lose sleep over it. ;) -
repo owner I'm worried
syntax-parse/typed
would get confused with typed racket. I likeparse-typed-syntax
though. @AlexKnauth ? -
repo owner Now that I'm thinking about names, "typed" doesnt feel right either. It should be "typechecking". Is
parse-typechecking-syntax
too long? -
repo owner - changed status to closed
provide syntax-parse/typed-syntax as parse-typed-syntax
- but dont remove the old name
- closes
#50
→ <<cset b23ee8fc3f36>>
-
I like what you said an hour ago about "typechecking." Following that idea, I think
syntax-parse/typecheck
would be a better name. -
@stchang Should we rename it to
syntax-parse/typecheck
, keepparse-typed-syntax
, or come up with something else related to the action of typechecking? -
repo owner I'm thinking about it.
syntax-parse/typecheck
is not bad and not too long. I think we should provide adefine-syntax/typecheck
alias as well then? -
I don't think we need to.
-
repo owner rename parse-typed-syntax to syntax-parse/typecheck; closes
#50again→ <<cset 0084146c1c70>>
-
repo owner So @lexi-lambda, we provided
syntax-parse/typed-syntax
assyntax-parse/typecheck
. Let us know if you don't like it. - Log in to comment