Hi, I agree that there is overlap between the two. I specifically wrote Network.URL because of some problems that I encountered while trying to use Network.URI on a project. My biggest problem was that Network.URI does not abstract away from representation issues, so one runs into all the usual PHP type of problems like forgetting to URL encode/decode, or doing it multiple times. It is (alsmost) like just working with Strings. Here is an example: show (URI "http:" Nothing "my?path" "" "") "http:my?path" which is incorrect in a number of different ways. Network.URL uses a different approach where the basic design principle is that programmers work with URLs as ordinary Haskell values, and then there are functions to convert to/from Strings/Bytes, which take care of representation issues. Here is an example: exportURL (URL HostRelative "my?path" []) "/my%3fpath" So, my vote (unsurprisingly) would be to obsolete/replace Network.URI. I am a bit worried that this might break a lot of code. On the other hand, recently we have been a lot more strict about specifying the precise dependencies for packages, so perhaps there won't be much of an issue? -Iavor On Fri, Jun 12, 2009 at 1:21 AM, Simon Marlow<simonmar@microsoft.com> wrote:
Hi Iavor,
I just noticed the url package on Hackage. There seems to be a lot of overlap between this and Network.URI in the network package. Perhaps they should be merged, or one of them deprecated?
Cheers, Simon