Network.CGI changes

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Sun Jan 20 20:13:20 EST 2008


On Mon, 2008-01-21 at 00:14 +0000, Frederik Eaton wrote:
> Hello all,
> 
> About two years ago, I wrote a web page for one of my projects, using
> Network.CGI. I chose that over WASH because it had a simple interface
> and I thought it would be more stable as a result. Now, Bjorn Bringert
> has replaced the interface with a completely different one. There is a
> cgi-compat, but it doesn't build with GHC 6.8.2.

You're in luck! It is trivial to get it to build:

{
hunk ./cgi.cabal 10
-Build-depends: base, network, parsec, mtl, xhtml, fps
+Build-depends: base, network, parsec, mtl, xhtml,
+               bytestring, containers, old-time, old-locale
}

That's against the current darcs version of the code. I guess it'd be
helpful to do that properly so it builds with both ghc-6.6 and 6.8 and
get it uploaded to hackage. I'm cc'ing Bjorn.

> P.S. Sometimes programmers make a rule of changing the names of things
> when they change the interface; this makes it possible to keep the old
> interface alongside the new one, so code which depends on the old
> interface don't have to change. Is there a reason why the Haskell
> community does not adopt this practice? It seems that people are
> always saying that there is a lack of manpower in this community,
> perhaps that is an excellent reason to make *fewer* incompatible
> changes, rather than more?

And Bjorn went one better and made a whole package with exactly the same
old api. That way there was an easy route for old programs and we don't
have to obfuscate the new api by having to avoid using the most obvious
names (that were in use in the old api).

Duncan



More information about the Glasgow-haskell-users mailing list