[racket] Why module runs twice?

From: Roman Klochkov (kalimehtar at mail.ru)
Date: Wed Nov 5 11:09:55 EST 2014

 Thank you all! Now I understand it.


Wed, 5 Nov 2014 10:28:07 -0500 от Stephen Chang <stchang at ccs.neu.edu>:
>Here is some more information:
>http://bugs.racket-lang.org/query/?cmd=view&pr=14535
>
>On Wed, Nov 5, 2014 at 9:26 AM, Jay McCarthy < jay.mccarthy at gmail.com > wrote:
>> It only prints it once for me. Are you running it in DrRacket? Perhaps
>> it is because one comes from Check Syntax?
>>
>> Jay
>>
>> On Wed, Nov 5, 2014 at 6:02 AM, Roman Klochkov < kalimehtar at mail.ru > wrote:
>>> #lang racket
>>> (define-syntax (test stx)
>>> #'(begin-for-syntax (displayln "Compiling")))
>>>
>>> (test)
>>>
>>> When run it gives:
>>>
>>> Compiling
>>> Compiling
>>>
>>> Why it runs test twice?
>>>
>>> And if I require it, then it triples:
>>>
>>> Compiling
>>> Compiling
>>> Compiling
>>>
>>> What's wrong?
>>>
>>>
>>> --
>>> Roman Klochkov
>>>
>>> ____________________
>>>   Racket Users list:
>>>  http://lists.racket-lang.org/users
>>>
>>
>>
>>
>> --
>> Jay McCarthy
>>  http://jeapostrophe.github.io
>>
>>            "Wherefore, be not weary in well-doing,
>>       for ye are laying the foundation of a great work.
>> And out of small things proceedeth that which is great."
>>                           - D&C 64:33
>> ____________________
>>   Racket Users list:
>>  http://lists.racket-lang.org/users


-- 
Roman Klochkov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20141105/1de6e312/attachment.html>

Posted on the users mailing list.