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 20:42:16 -0700

PS: I am aware of the uri-match egg, and considered using it, but I
felt the tree syntax was unnecessarily complex for this application.
If I can't get matchable working I might reconsider that choice.

On Tue, Mar 4, 2014 at 8:39 PM, Matt Gushee <address@hidden> wrote:
> Hi, all--
>
> I'm working on a new version of my coq-au-vin egg; one of the major
> changes is that I am moving the FastCGI request handling code into a
> module within the egg--it was previously separate.
>
> However, I'm now getting a compile error like this:
>
> :  Warning: reference to possibly unbound identifier `ofs' in:
> :  Warning:    failure527
>
> :  Error: module unresolved: cav-web-fcgi
>
> I am using 'match' from the matchable egg to dispatch requests, like this:
>
> : (match spec
> :       [(or ((/ "") "GET" #f) ((/ "articles") "GET" #f))
> :           (send-html (get-article-list-page/html out: #f))]
> :       [(or ((/ "") "GET" #f) ((/ "articles") "GET" ofs))
> :           (send-html (get-article-list-page/html out: #f offset:
> (string->number ofs)))]
>
> ... and so on. So 'ofs' is a variable in the pattern match.
>
> This code has been working for some time, but it was not in a module
> before; it still compiles if I comment out the module-specific code,
> i.e.:
>
> :  ; (module cav-web-fcgi
>                     ; *
>                     ; (import scheme chicken)
>
> but I cannot get it to compile as a module. I imagine it has something
> to do with 'match' being a macro, but I don't know what to do about
> it. Any ideas?
>
> --
> Matt Gushee



reply via email to

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