<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Jul 27, 2014, at 1:37 PM, Roman Klochkov <<a href="mailto:kalimehtar@mail.ru">kalimehtar@mail.ru</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"> I looked into  <a href="https://github.com/qerub/rackjure/blob/master/rackjure/lambda-reader.rkt">https://github.com/qerub/rackjure/blob/master/rackjure/lambda-reader.rkt</a><br>As far as I understand, reader-proce returns #'(lambda ...) for  #λ(...).<br>But, according to  <a href="http://docs.racket-lang.org/reference/reader-procs.html">http://docs.racket-lang.org/reference/reader-procs.html</a> it should return (datum->syntax #f '(lambda ...))<br>Maybe, this is the source of the error<br></blockquote><div><br></div><div>No, it’s actually a good thing that it returns #’(lambda …) because I want the lambda to be bound to the lambda from racket/base no matter what bindings there might be in the file it’s used in.  That’s one great thing about hygienic macros and syntax-objects.  For example this works fine:</div><div><div><font face="Courier New">#lang rackjure</font></div><div><font face="Courier New">(require rackunit)</font></div><div><font face="Courier New">(define lambda "whatever")</font></div><div><font face="Courier New">(check-equal? (map #λ(+ % %2) '(1 2 3) '(1 2 3))</font></div><div><font face="Courier New">              '(2 4 6))</font></div></div><div><br></div><div>If it were (datum->syntax #f ‘(lambda …) it wouldn’t work.  </div><div><br></div><div>That’s why it’s #’(lambda …) instead of (datum->syntax #f '(lambda …)).  </div><br><blockquote type="cite"><br>Sun, 27 Jul 2014 12:21:36 -0400 от "Alexander D. Knauth" <<a href="mailto:alexander@knauth.org">alexander@knauth.org</a>>:<br><blockquote type="cite">I just tried to try it and see if it worked, when I realized that it won’t work because I can’t use quote-syntax.  <br><br>Is there any way to get around that?  And would it even work anyway?  <br>On Jul 27, 2014, at 6:59 AM, Roman Klochkov < <a href="mailto:kalimehtar@mail.ru">kalimehtar@mail.ru</a> > wrote:<br><blockquote type="cite">Maybe via " Cross-Phase Persistent Module Declarations"  <a href="http://docs.racket-lang.org/reference/syntax-model.html#%28part._cross-phase._persistent-grammar%29">http://docs.racket-lang.org/reference/syntax-model.html#%28part._cross-phase._persistent-grammar%29</a>   ?<br><br><br>Thu, 24 Jul 2014 21:24:20 -0400 от "Alexander D. Knauth" < <a href="mailto:alexander@knauth.org">alexander@knauth.org</a> >:<br><blockquote type="cite">How can I make an identifier that will have a certain binding no matter what phase level it's referenced at?<br><br>For example if I’m making a reader extension that will produce a lambda expression, how do I make it so that the lambda expression will be able to exist at any phase level?<br><br>For example this program using #lang rackjure doesn’t work:<br>#lang rackjure<br>(require (for-meta 1 racket/base)<br>         (for-meta 2 racket/base)<br>         (for-meta 3 racket/base)<br>         (for-meta 4 racket/base)<br>         )<br>                                                                                             <br>#λ(* 2 %) ; works, produces approx. (lambda (%) (* 2 %))<br>(begin-for-syntax<br>  (begin-for-syntax<br>    #λ(* 2 %) ; lambda: unbound identifier at phase 2;<br>    ;         ;   also, no #%app syntax transformer is bound in: lambda<br>    ))<br><br>Is there any way to construct an identifier that would be bound to lambda from racket/base no matter what phase level it’s used in?<br><br><br>____________________<br>  Racket Users list:<br>   <a href="http://lists.racket-lang.org/users">http://lists.racket-lang.org/users</a><br><br></blockquote><br><br>--  <br>Roman Klochkov<br></blockquote></blockquote><br><br>-- <br>Roman Klochkov<br></blockquote></div><br></body></html>