network-house- data and parsers for Ethernet, TCP, UDP, IPv4, IPv6, ICMP, DHCP, TFTP

Safe HaskellSafe-Inferred



Various utilities used in the network protocol stack modules



replace :: Functor f => f a -> b -> f bSource

emap :: (Functor f, Container f1) => (a1 -> f a) -> f1 a1 -> f (f1 a)Source

emap2 :: (Functor f, Container f1, Container f2) => (a1 -> f a) -> f1 (f2 a1) -> f (f1 (f2 a))Source

lift :: (Functor f, Container f1) => f1 (f a) -> f (f1 a)Source

lift2 :: (Functor f, Container f1, Container f2) => f1 (f2 (f a)) -> f (f1 (f2 a))Source

doReq :: (MVarIO v m, MVarIO v io, ChannelIO c m) => c a -> ((b -> io ()) -> a) -> m bSource

foldlArray :: (IArray arr elem, Ix ix, Enum ix) => arr ix elem -> (elem -> a -> a) -> a -> aSource

arraySize :: (Num a1, Ix a1, IArray a e) => a a1 e -> a1Source

The number of elements in an array

checksum :: [Word16] -> Word16Source

TCP/IP 16-bit checksums

pairs :: a -> [a] -> [[a]]Source

Split a list into subcomponents of length 2. The first argument is what to append in case the list is of odd length.