Network.CGI changes

Frederik Eaton frederik at a5.repetae.net
Tue Jan 22 12:28:34 EST 2008


Hi Bjorn,

Well, I don't know what the solution is. As I have said, I think it
would be best to keep Network.CGI.Compat. That way, users of the old
module just have to change the module name, plus they don't have to
hack cgi-compat to get it to compile when cgi is already working.

A typical project of mine uses 10 or more packages, and something that
makes me reluctant to use Haskell is the experience that after a few
years I will end up having to maintain separate versions of
significant numbers of those packages if I want something I wrote to
stay working. Haskell is supposed to be good for writing large
projects, but large projects need stable libraries or they become a
maintenance nightmare. It's rather worrying to see that people seem to
think that if I don't have time to participate actively in the mailing
lists or upload stuff to hackage, then my code doesn't exist...

Maybe there is a high cost to keeping Network.CGI.Compat in the cgi
package, but I don't see any reason other than an aesthetics, which
seems like less of a priority than backwards compatibility.

Frederik

On Tue, Jan 22, 2008 at 05:31:01PM +0100, Björn Bringert wrote:
> 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: 
> http://www.cs.chalmers.se/~bringert/darcs/cgi-compat/Network/CGI/Compat.hs
> 
> /Björn
> 
> 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.
> >>
> 

-- 
http://ofb.net/~frederik/


More information about the Glasgow-haskell-users mailing list