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,,,
