Adding Network.URI.escape

Gwern Branwen gwern0 at gmail.com
Fri Dec 25 10:35:43 EST 2009


Network.URI.escapeURIString is pretty much always used to make a
String a URL or a part of a URL.

The existing definition
http://www.haskell.org/ghc/docs/6.10.4/html/libraries/network/Network-URI.html#v%3AescapeURIString
forces one to do extra work by having to specify a `Char -> Bool`.

More than a few packages & libraries simply define an 'escape'
function `escapeURIString isAllowedInURI` (either inline or as a named
function). This sort of repetition is unfortunate.

The name 'escape' is commonly used to express exactly that
functionality: http://holumbus.fh-wedel.de/hayoo/hayoo.html#0:escape

What would people say to adding such a function?

-- 
gwern
-------------- next part --------------
A non-text attachment was scrubbed...
Name: escape
Type: application/octet-stream
Size: 5243 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/libraries/attachments/20091225/154d5f83/escape.obj


More information about the Libraries mailing list