> Sounds like "local-expand", no?
> No macro that I've ever written needed to do this.  And why would you
> want to expand the code yourself if the expander is already going to
> do that for you?

I meant that you get to choose whether to operate on the syntax object
post-expansion versus always having to use the pre-expansion version.
Now I can think of a problem, though - the result of expansions might
not be a syntax object that you can work with.

> You resort to CPS when all you have is syntax-rules.  With syntax-case
> I don't see why you ever need to CPS your macros since you can do as
> you please with the input syntax object (take it apart, play with it,
> put it back together, etc).  I really want to see these certain macros
> that make you have to CPS.

You may be right - I think I was operating under a syntax-rules only
constraint for the macros I was thinking of.

>
>> and it may be necessary for a macro-based type checking system.
>
> I don't have anything more to add to what I already said (below)
> regarding this.
>
> Aziz,,,
>
>
>> On Fri, Apr 24, 2009 at 4:53 AM, Abdulaziz Ghuloum <[email protected]>
>> wrote:
>>>
>>> On Apr 23, 2009, at 1:31 PM, Ramana Kumar wrote:
>>>
>>>> I've asked about this on comp.lang.scheme, but I'd also like to see if
>>>> there are Ikarus-specific solutions.
>>>>
>>>> Is it possible to write a macro-friendly type-checker that signals
>>>> errors, if any, during expansion and disappears afterwards?
>>>
>>> Nop.
>>>
>>>> Typed
>>>> Scheme does this, but requires PLT's local-expand to expand all other
>>>> macros before type checking. I don't think Ikarus has anything public
>>>> like local-expand, right?
>>>
>>> Right.  Typed scheme requires more than local-expand to work since
>>> its whole design is based on expand-time side effects, multiple
>>> instantiation of libraries, and probably other things.  Not one of
>>> these PLT-specific features is currently supported (or even likely
>>> to be supported in the future) by any other Scheme implementation.
>>>
>>>> Is it possible to write lazy-lambda that creates a procedure for which
>>>> application is call-by-need?
>>>
>>> No.  The procedure is in no way tied to the call sites.
>>>
>>>> I know you could write a lazy-define to
>>>> create procedures that were actually macros that wrapped arguments in
>>>> thunks, but what about anonymous or first-class procedures?
>>>
>>> It won't work.
>>>
>>>> I think
>>>> this would require taking over the application syntax "(rator rand
>>>> ....)", which I think is possible with PLT's app macros;
>>>
>>> That's one way, but these procedures won't work if, say, they're
>>> exported to modules that are not lazy.  In a strict language, you
>>> have to arrange to call lazy procedures in a special way.
>>> Similarly, you need to call eager procedures in a lazy language
>>> in a special way.  (I don't know how/if that works well)
>>>
>>> Anyways, Ikarus does not have an implicit %app macro, and when it
>>> does, it won't be compatible with PLT's (read the description of
>>> that in the PLT reference).
>>>
>>>> I'm not sure how the solution should look.
>>>
>>> Google for lazy scheme. :-)
>>>
>>> Aziz,,,
>>>
>
>

Reply via email to