[Haskell] [ANNOUNCE] network-address-0.2.0

Sebastian Nowicki sebnow at gmail.com
Wed Sep 7 14:03:03 CEST 2011


Hi All,

I'm pleased to announce the release of network-address v0.2.0. The
library provides data structures and textual representation of network
addresses (IPv4, IPv6, subnets).

Major changes in this release:

 * Revised Address type class (readAddress was moved out of the class,
readsAddress :: String -> ReadS a was added for better error
reporting)
 * Better support for IPv6 parsing (compressed zeroes).
 * Implementation of RFC5952 (a recommendation for IPv6 text
representation). Most notably showAddress for IPv6 compresses zeroes.

Example GHCi session:

*Data.Network.Address> let ip = readAddress "2001:db8:0:0:0::1" :: IPv6
*Data.Network.Address> ip
IPv6 2306139568115548160 1
*Data.Network.Address> showAddress ip
"2001:db8::1"
*Data.Network.Address> let subnet = readSubnet "2001:db8::1/56" :: IPSubnet IPv6
*Data.Network.Address> showSubnet subnet
"2001:db8::/56"
*Data.Network.Address> ip `member` subnet
True

Planned for the next release:

 * Support for parsing IPv4 notation embedded in IPv6 (e.g. "::192.168.1.1")
 * Performance optimisations - IPv6 parsing/pretty printing is quite
slow due to zero compression (>2x speed decrease)

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).

Hackage: http://hackage.haskell.org/package/network-address
GitHub: https://github.com/sebnow/haskell-network-address

Regards,
Sebastian



More information about the Haskell mailing list