Module

URI.Host.IPv4Address

Package
purescript-uri
Repository
purescript-contrib/purescript-uri

#IPv4Address Source

data IPv4Address

The IPv4 address variation of the host part of a URI.

Instances

#fromInts Source

fromInts :: Int -> Int -> Int -> Int -> Maybe IPv4Address

Constructs a IPv4Address part safely: bounds-checks each octet to ensure it occurs within the range 0-255 (inclusive).

#unsafeFromInts Source

unsafeFromInts :: Int -> Int -> Int -> Int -> IPv4Address

Constructs a IPv4Address part unsafely: if any of the arguments are outside the allowable bounds, a runtime error will be thrown.

This is intended as a convenience when describing IPv4Addresses statically in PureScript code, in all other cases fromInts should be used.

#parser Source

parser :: Parser String IPv4Address

A parser for IPv4 addresses.

#print Source

print :: IPv4Address -> String

A printer for IPv4 adddresses.