Network.CGI changes

Björn Bringert bringert at
Tue Jan 22 11:31:01 EST 2008

Hi Frederik,

(I'm CC:ing the libraries list, so that anyone who wants to have 
Network.CGI.Compat back in the cgi package can shout.)

That exact module actually used to exist in the cgi package as well (it 
implemented the complete API of the old Network.CGI), but after a few 
releases I removed it since it didn't seem to have any users. That was 
quite a long time ago, and you are the first person to complain.

The purpose of cgi-compat is actually not to provide Network.CGI.Compat, 
but rather to be installable on older GHC versions, hence the main 
module name Network.NewCGI.

I'm not sure if there is sufficient demand for adding Network.CGI.Compat 
back into the cgi package. The old Network.CGI seemed to have very few 
users, due to to it's restrictions. You can always get 
Network.CGI.Compat from here, and include it in your program:


Frederik Eaton wrote:
> Dear Johannes,
> Thanks, that works for me.
> Bjorn, perhaps it would be easier to put these five lines in a module
> (Network.CGI.Compat?) in the new package, rather than having people
> maintain and download a separate cgi-compat package? Perhaps the two
> other functions in the old CGI interface can be implemented in terms
> of the new API as well?
> Best wishes,
> Frederik
> On Mon, Jan 21, 2008 at 09:50:46AM +0100, Johannes Waldmann wrote:
>> If you need the old "wrapper" function, then use something like this:
>> wrapper :: ([(String,String)] -> IO Html) -> IO ()
>> wrapper f = runCGI $ do
>>     e <- getInputs
>>     a <- lift $ f $ e
>>     output $ renderHtml a
>> best regards, Johannes Waldmann.

More information about the Libraries mailing list