[Haskell] [ANNOUNCE] network-address-0.2.0
Ben Millwood
haskell at benmachine.co.uk
Thu Sep 8 15:05:42 CEST 2011
On Wed, Sep 7, 2011 at 1:03 PM, Sebastian Nowicki <sebnow at gmail.com> wrote:
> The next release will likely be v1.0.0 as there isn't much to add. I'd
> like to keep the API stable in that version, I welcome any feedback
> regarding the API (or otherwise).
The main problem is lacking an effective way to parse addresses from
strings - the readAddress interface is unsafe and doesn't give the
remainder of the string. Consider using the ReadS convention,
providing a function readsAddress :: String -> [(a,String)] which
provides all possible parses (usually at most one) and the remainder
of the string. Then users can parse addresses followed by other data
easily.
I'm actually also not clear how I'd actually *use* one of these
addresses with any network library.
Regarding the whole read/show question, there's some dispute about
what those two functions are actually supposed to do. It therefore
seems sensible to have functions explicitly for transforming into the
standard string representations of addresses, rather than the
read/show functions which are basically permitted to do whatever they
like.
More information about the Haskell
mailing list