ip: Library for IP and MAC addresses

[ bsd3, library, web ] [ Propose Tags ]

The ip package provides types and functions for dealing with IPv4 addresses, CIDR blocks, and MAC addresses. We provide instances for typeclasses found in commonly used packages like aeson, vector, and hashable. We also provide Parsers for working with attoparsec. . Notably, this package does not overload functions by introducing any typeclasses of its own. Neither does it prefix functions with the name of the type that they work on. Instead, functions of the same name are exported by several different modules, and it is expected that end users disambiguate by importing these modules qualified. . The only module intended to be imported unqualified is Net.Types. The types in this package should not conflict with the types in any other commonly used packages. . The following packages are intended to be used with this package: . * `yesod-ip`: Provides orphan instances needed to work with yesod and persistent. Also, provides a `yesod-form` helper.

[Skip to Readme]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Versions [RSS] 0.1, 0.2, 0.3, 0.4, 0.5, 0.6.0, 0.6.1, 0.6.2, 0.7, 0.8, 0.8.1, 0.8.3, 0.8.4, 0.8.5, 0.8.6, 0.8.7, 0.9, 0.9.1, 0.9.2, 0.9.3, 1.0.0, 1.1.0, 1.1.1, 1.1.2, 1.2.0, 1.2.1, 1.3.0, 1.4.0, 1.4.1, 1.4.2,, 1.5.0, 1.5.1, 1.6.0, 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5, 1.7.6, 1.7.7, 1.7.8
Change log CHANGELOG.md
Dependencies aeson (>=1.0), attoparsec (>=0.13), base (>=4.9 && <5), bytebuild (>=0.3.4), byteslice (>=0.1.2), bytesmith (>=0.3.9), bytestring (>=0.10.8), deepseq (>=1.4), hashable (>=1.2), natural-arithmetic (>=0.1), primitive (>=0.6.4), text (>=1.2), text-short (>=0.1.3), vector (>=0.11), wide-word (>=, word-compat (>=0.0.4) [details]
License BSD-3-Clause
Copyright 2016 Andrew Martin
Author Andrew Martin
Maintainer amartin@layer3com.com
Category web
Home page https://github.com/byteverse/haskell-ip
Bug tracker https://github.com/byteverse/haskell-ip/issues
Source repo head: git clone git://github.com/byteverse/haskell-ip.git
Uploaded by l3c_amartin at 2024-03-01T18:10:36Z
Distributions LTSHaskell:1.7.8, NixOS:1.7.8, Stackage:1.7.8
Reverse Dependencies 24 direct, 13 indirect [details]
Downloads 28697 total (138 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2024-03-01 [all 1 reports]

Readme for ip-1.7.8

[back to package description]



Look at the haddocks for this package to learn how to use it.


Most contributions are welcome, especially performance improvements in encoding and decoding of Text/ByteString. Please make sure to follow naming conventions followed in the modules.


Doctest used to be provided as a test suite, but doctest-0.20 and higher do not require this to be run. To run the doctests, make sure you have doctest on your path (i.e. run cabal install doctest), and then run:

cabal build
cabal repl --build-depends=QuickCheck --with-ghc=doctest --repl-options='-fno-warn-orphans'

This runs incredibly slowly, but it works for now. Doctest is not run by CI, so if you make a change that adds more doctests, it needs to be run by hand by someone. (The maintainer is happy to do this if you're on a platform where doctest is finicky.)