HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleiproute-1.7.15Haskell2010

Data.IP.Internal

  • 5 types
  • Packageiproute-1.7.15
  • Exports5
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceAddr.hs
newtypenewtype IPv4
#

The abstract data type to express an IPv4 address. To create this, use toIPv4. Or use read "192.0.2.1" :: IPv4, for example. Also, "192.0.2.1" can be used as literal with OverloadedStrings.

Example1 expression
read "192.0.2.1" :: IPv4192.0.2.1

Constructors

Instances14Bounded, Enum, Eq, Data, Ord, Show, …
newtypenewtype IPv6
#

The abstract data type to express an IPv6 address. To create this, use toIPv6. Or use read "2001:DB8::1" :: IPv6, for example. Also, "2001:DB8::1" can be used as literal with OverloadedStrings.

Example7 expressions
read "2001:db8:00:00:00:00:00:01" :: IPv62001:db8::1read "2001:db8:11e:c00::101" :: IPv62001:db8:11e:c00::101read "2001:db8:11e:c00:aa:bb:192.0.2.1" :: IPv62001:db8:11e:c00:aa:bb:c000:201read "2001:db8::192.0.2.1" :: IPv62001:db8::c000:201read "0::ffff:192.0.2.1" :: IPv6::ffff:192.0.2.1read "0::0:c000:201" :: IPv6::192.0.2.1read "::0.0.0.1" :: IPv6::1

Constructors

Instances14Bounded, Enum, Eq, Data, Ord, Show, …
datadata AddrRange a
#

The Addr range consists of an address, a contiguous mask, and mask length. The contiguous mask and the mask length are essentially same information but contained for pre calculation.

To create this, use makeAddrRange or read "192.0.2.0/24" :: AddrRange IPv4. Also, "192.0.2.0/24" can be used as literal with OverloadedStrings.

Example2 expressions
read "192.0.2.1/24" :: AddrRange IPv4192.0.2.0/24read "2001:db8:00:00:00:00:00:01/48" :: AddrRange IPv62001:db8::/48

Constructors

Instances10Eq, Data, Ord, Read, Show, IsString, …