[Haskell-cafe] CGI module almost useless

Bjorn Bringert bringert at cs.chalmers.se
Wed Jun 15 10:04:03 EDT 2005

Graham Klyne wrote:
> At 23:06 14/06/05 +0200, Bjorn Bringert wrote:
>> To the people here who are interested in the CGI module: What do you 
>> think of this interface? Could we replace the current Network.CGI with 
>> something like this?
> I am coming partway into this issue, and may be missing some prior art 
> (or something).
> I think a an easy-to-use CGI module would be cool.  Your sample code 
> suggests a nice easy-to-use interface.  Even cooler would be if it  
> comes with support to hook into Apache's FastCGI module, or similar 
> optimized invocation from Apache.  That might inspire me to do some more 
> work on my nascent SPARQL (RDF query) implementation.

Graham, thanks for the suggestion. I went and had a look at FastCGI, and 
wrote an FFI binding to the fcgiapp C library. You can now use CGI 
programs with either CGI or FastCGI, using the same interface.

My CGI module is in a darcs repo at: 

The FastCGI module is at:

To use FastCGI instead of CGI, just import Network.FastCGI instead of 
Network.CGI (currently Network.NewCGI to avoid conflicts).

A simple example with CGI: 

And with FastCGI: 


More information about the Libraries mailing list