[racket] Stateless servlets and formlets error

From: Lorenz Köhl (rainbowtwigs at gmail.com)
Date: Wed Feb 6 11:00:46 EST 2013

>> Why does the extra lambda lead to this error message?
> 
> The answer to the "WHY" is this:
> 
> 2. If you inline it, or replace the f is send/form2 with
> 'main-input-formlet', then you are now referring to a global variable,
> which is never part of closures, because it is always available.

I see, this is what confused me. Thanks for the explanation.

> I don't think the benefits are worth it to justify things in the case
> of formlets, but I'm open to arguments.

I'll make the formlets toplevel.

The other problem I have is calling functions from the servlet that use send/suspend and friends, which expect certain continuation marks as I understand it. Is it possible to fake these for a unit test?

Another way is to modify make-servlet-tester to not redact the response so I can test other properties like return code and headers. But I'd prefer to do it directly.

Lo

Posted on the users mailing list.