Foundation.Network.IPv4

foundation-0.0.30: Alternative prelude with batteries and no dependencies

License | BSD-style
Maintainer | Nicolas Di Prima <nicolas@primetype.co.uk>
Stability | experimental
Portability | portable
Safe Haskell | None
Language | Haskell2010

Foundation.Network.IPv4

Description

IPv4 data type

Synopsis

- data IPv4
- any :: IPv4
- loopback :: IPv4
- fromString :: IsString a => String -> a
- toString :: IPv4 -> String
- fromTuple :: (Word8, Word8, Word8, Word8) -> IPv4
- toTuple :: IPv4 -> (Word8, Word8, Word8, Word8)
- ipv4Parser :: (ParserSource input, Element input ~ Char, Sequential (Chunk input), Element input ~ Element (Chunk input)) => Parser input IPv4

# Documentation

data IPv4 #

IPv4 data type

#### Instances

Instances details

NormalForm IPv4 # |
Instance details Defined in Foundation.Network.IPv4 Methods toNormalForm :: IPv4 -> () #
Storable IPv4 # |
Instance details Defined in Foundation.Network.IPv4 Methods peek :: Ptr IPv4 -> IO IPv4 # poke :: Ptr IPv4 -> IPv4 -> IO () #
StorableFixed IPv4 # |
Instance details Defined in Foundation.Network.IPv4 Methods size :: proxy IPv4 -> CountOf Word8 # alignment :: proxy IPv4 -> CountOf Word8 #
Hashable IPv4 # |
Instance details Defined in Foundation.Network.IPv4 Methods hashMix :: Hasher st => IPv4 -> st -> st #
IsString IPv4 # |
Instance details Defined in Foundation.Network.IPv4 Methods fromString :: String -> IPv4 #
Show IPv4 # |
Instance details Defined in Foundation.Network.IPv4 Methods showsPrec :: Int -> IPv4 -> ShowS # show :: IPv4 -> String # showList :: [IPv4] -> ShowS #
Eq IPv4 # |
Instance details Defined in Foundation.Network.IPv4 Methods (==) :: IPv4 -> IPv4 -> Bool # (/=) :: IPv4 -> IPv4 -> Bool #
Ord IPv4 # |
Instance details Defined in Foundation.Network.IPv4 Methods compare :: IPv4 -> IPv4 -> Ordering # (<) :: IPv4 -> IPv4 -> Bool # (<=) :: IPv4 -> IPv4 -> Bool # (>) :: IPv4 -> IPv4 -> Bool # (>=) :: IPv4 -> IPv4 -> Bool # max :: IPv4 -> IPv4 -> IPv4 # min :: IPv4 -> IPv4 -> IPv4 #

any :: IPv4 #

"0.0.0.0"

loopback :: IPv4 #

"127.0.0.1"

fromString :: IsString a => String -> a #

toString :: IPv4 -> String #

fromTuple :: (Word8, Word8, Word8, Word8) -> IPv4 #

toTuple :: IPv4 -> (Word8, Word8, Word8, Word8) #

ipv4Parser :: (ParserSource input, Element input ~ Char, Sequential (Chunk input), Element input ~ Element (Chunk input)) => Parser input IPv4 #

Parse a IPv4 address