chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Matchable not working in module


From: Matt Gushee
Subject: Re: [Chicken-users] Matchable not working in module
Date: Tue, 4 Mar 2014 23:06:56 -0700

Hi, Evan--

On Tue, Mar 4, 2014 at 10:36 PM, Evan Hanson <address@hidden> wrote:

>> :       [(or ((/ "") "GET" #f) ((/ "articles") "GET" ofs))
>> :           (send-html (get-article-list-page/html out: #f offset:
>> (string->number ofs)))]

> `ofs` is only present in the second arm of the `(or ...)` pattern, so
> I'm guessing this is due `ofs` being unbound in the expansion of the
> first alternative. It's as if you had said:

Whoops! You're right. I'm surprised I didn't catch that before. Looks
like that #f in the first branch should have been 'ofs' all along.

> untested!). This probably only worked before due to the forgiving nature
> of the top level (which is hopeless, and so on).

If by top level you mean the REPL, that's not the issue. That code
compiled (many times) and has been running on my web server for 4
months. Only when I wrapped it in a module did it fail to compile.
Isn't that a little disturbing?

If I had some sort of rigorous test script, I probably would have
caught that error; I really don't know how to do that for a FastCGI
app. Since it won't really work without the (separate) web server,
normal unit testing isn't very applicable.

Anyway, many thanks for spotting that. Now I will be able to sleep tonight ;-)

--
Matt Gushee



reply via email to

[Prev in Thread] Current Thread [Next in Thread]