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

Safe HaskellSafe-Inferred
LanguageHaskell98

Net.Utils

Description

Various utilities used in the network protocol stack modules

Synopsis

Documentation

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

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

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

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

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

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

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

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

The number of elements in an array

checksum :: [Word16] -> Word16 Source

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.