<div dir="ltr">Unfortunately those options wouldn't help because I ran across this issue where an extension to Typed Racket I was working with was using splicing-syntax-parameterize "under the hood" to provide some interesting extensions. I would prefer it if those extensions didn't prohibit use of : within them for type annotations.<div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 4, 2014 at 12:37 PM, Alexander D. Knauth <span dir="ltr"><<a href="mailto:alexander@knauth.org" target="_blank">alexander@knauth.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div><span class=""><div>On Dec 4, 2014, at 3:24 PM, Jack Firth <<a href="mailto:jackhfirth@gmail.com" target="_blank">jackhfirth@gmail.com</a>> wrote:</div><br></span><blockquote type="cite"><span class=""><div dir="ltr"><div><p style="margin:1.2em 0px!important">I’m having an issue where splicing-syntax-parameterize removes type annotations in Typed Racket. I posted a <a href="http://stackoverflow.com/questions/27302460/splicing-syntax-parameterize-disables-typed-racket-type-annotations" target="_blank">question</a> about it to Stack Overflow, and any assistance would be welcomed greatly.</p>
<div title="MDH:SSdtIGhhdmluZyBhbiBpc3N1ZSB3aGVyZSBzcGxpY2luZy1zeW50YXgtcGFyYW1ldGVyaXplIHJl
bW92ZXMgdHlwZSBhbm5vdGF0aW9ucyBpbiBUeXBlZCBSYWNrZXQuIEkgcG9zdGVkIGEgW3F1ZXN0
aW9uXShodHRwOi8vc3RhY2tvdmVyZmxvdy5jb20vcXVlc3Rpb25zLzI3MzAyNDYwL3NwbGljaW5n
LXN5bnRheC1wYXJhbWV0ZXJpemUtZGlzYWJsZXMtdHlwZWQtcmFja2V0LXR5cGUtYW5ub3RhdGlv
bnMpIGFib3V0IGl0IHRvIFN0YWNrIE92ZXJmbG93LCBhbmQgYW55IGFzc2lzdGFuY2Ugd291bGQg
YmUgd2VsY29tZWQgZ3JlYXRseS4=" style="min-height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-size:0em;padding:0;margin:0"></div></div></div></span>
____________________<br> Racket Users list:<br> <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br></blockquote></div><br><div><blockquote type="cite"><span style="font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;font-size:14px;line-height:18px;background-color:rgb(255,255,255)">I would hazard a guess it's because the </span><code style="margin:0px;padding:1px 5px;border:0px;font-size:14px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;white-space:pre-wrap;line-height:18px">splicing-syntax-parameterize</code><span style="font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;font-size:14px;line-height:18px;background-color:rgb(255,255,255)"> is basing its behavior on the untyped </span><code style="margin:0px;padding:1px 5px;border:0px;font-size:14px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;white-space:pre-wrap;line-height:18px">begin</code><span style="font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;font-size:14px;line-height:18px;background-color:rgb(255,255,255)"> form instead of the </span><code style="margin:0px;padding:1px 5px;border:0px;font-size:14px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;white-space:pre-wrap;line-height:18px">begin</code><span style="font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;font-size:14px;line-height:18px;background-color:rgb(255,255,255)"> form from Typed Racket, and thus knows absolutely nothing about the </span><code style="margin:0px;padding:1px 5px;border:0px;font-size:14px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;white-space:pre-wrap;line-height:18px">:</code><span style="font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;font-size:14px;line-height:18px;background-color:rgb(255,255,255)"> form. If that's the case, how can I work around this?</span></blockquote><br></div><div>I don’t know why this is happening, but I don’t think it’s an issue with using an untyped begin versus a typed begin, because using for instance splicing-local or splicing-let gives the expected type error. </div><div><br></div><div>As for a workaround, would something like this work for you?</div><div><div>#lang typed/racket</div><div>(require racket/stxparam</div><div> racket/splicing)</div><div>(define-syntax-parameter x #f)</div><div>(splicing-syntax-parameterize ([x #'foo])</div><div> (define #{n : Number} "string”))</div></div><div><br></div><div>Or this?</div><div><div>#lang typed/racket</div><div>(require racket/stxparam</div><div> racket/splicing)</div><div>(define-syntax-parameter x #f)</div><div>(: n Number)</div><div>(splicing-syntax-parameterize ([x #'foo])</div><div> (define n "string”))</div></div><div><br></div><div><br></div></div></blockquote></div><br></div></div>