HORIZON HASKELLDocslts/ghc-9.14.xd82dee82026-10-12Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · d82dee8 · 2026-10-12

Modulesocket-0.8.3.0Haskell2010

System.Socket.Family.Inet6

  • 6 types
  • 8 values
  • Packagesocket-0.8.3.0
  • Exports16
  • LanguageHaskell2010
  • LicenceMIT
  • SourceInet6.hsc

Inet6

1 declaration
datadata Inet6
#
Instances7HasAddressInfo, HasNameInfo, Family, Eq, Show, Storable, …

Inet6Address

datadata Inet6Address
#

To avoid errors with endianess it was decided to keep this type abstract.

Use inet6AddressFromTuple and inet6AddressToTuple for constructing and deconstructing custom addresses.

Hint: Use the Storable instance. It exposes it exactly as found within an IP packet (big endian if you insist on interpreting it as a number).

Another hint: Use getAddressInfo for parsing and suppress nameserver lookups:

> getAddressInfo (Just "::1") Nothing aiNumericHost :: IO [AddressInfo SocketAddressInet6 Stream TCP]
[AddressInfo {
   addressInfoFlags = AddressInfoFlags 4,
   socketAddress    = SocketAddressInet6 {inet6Address = Inet6Address 0000:0000:0000:0000:0000:0000:0000:0001, inet6Port = Inet6Port 0, inet6FlowInfo = Inet6FlowInfo 0, inet6ScopeId = Inet6ScopeId 0},
   canonicalName    = Nothing }]
Instances3Eq, Show, Storable

Inet6Port

newtypenewtype Inet6Port
#
Instances8Enum, Eq, Integral, Num, Ord, Real, …
  • Enum Inet6PortDefined in socket-0.8.3.0 · System.Socket.Family.Inet6
  • Eq Inet6PortDefined in socket-0.8.3.0 · System.Socket.Family.Inet6
  • Integral Inet6PortDefined in socket-0.8.3.0 · System.Socket.Family.Inet6
  • Num Inet6PortDefined in socket-0.8.3.0 · System.Socket.Family.Inet6
  • Ord Inet6PortDefined in socket-0.8.3.0 · System.Socket.Family.Inet6
  • Real Inet6PortDefined in socket-0.8.3.0 · System.Socket.Family.Inet6
  • Show Inet6PortDefined in socket-0.8.3.0 · System.Socket.Family.Inet6
  • Storable Inet6PortDefined in socket-0.8.3.0 · System.Socket.Family.Inet6

Inet6FlowInfo

newtypenewtype Inet6FlowInfo
#
Instances8Enum, Eq, Integral, Num, Ord, Real, …

Inet6ScopeId

newtypenewtype Inet6ScopeId
#
Instances8Enum, Eq, Integral, Num, Ord, Real, …
familydata family SocketAddress f
#

The SocketAddress type is a data family. This allows to provide different data constructors depending on the socket family without knowing all of them in advance or the need to extend this core library.

SocketAddressInet  inetLoopback  8080     :: SocketAddress Inet
SocketAddressInet6 inet6Loopback 8080 0 0 :: SocketAddress Inet6
Instances8Eq, Show, Storable, SocketAddress, …

Custom addresses

0 declarations

inet6AddressFromTuple

inet6AddressToTuple

Special addresses

0 declarations

inet6Any

inet6Loopback

Socket options

0 declarations

V6Only

datadata V6Only
#
IPV6_V6ONLY

Constructors

Instances4Eq, Ord, Show, SocketOption
  • Eq V6OnlyDefined in socket-0.8.3.0 · System.Socket.Family.Inet6
  • Ord V6OnlyDefined in socket-0.8.3.0 · System.Socket.Family.Inet6
  • Show V6OnlyDefined in socket-0.8.3.0 · System.Socket.Family.Inet6
  • SocketOption V6OnlyDefined in socket-0.8.3.0 · System.Socket.Family.Inet6