Safe Haskell | None |
---|---|
Language | Haskell2010 |
- attoparsecParseJSON :: Parser a -> Value -> Parser a
- rightToMaybe :: Either a b -> Maybe b
- toDotDecimalText :: Word32 -> Text
- toDotDecimalBuilder :: Word32 -> Builder
- rangeToDotDecimalText :: Word32 -> Word8 -> Text
- rangeToDotDecimalBuilder :: Word32 -> Word8 -> Builder
- toTextPreAllocated :: Word32 -> Text
- putAndCount :: Int -> Word8 -> MArray s -> ST s Int
- zero :: Word16
- i2w :: Integral a => a -> Word16
- twoDigits :: ByteString
- threeDigits :: ByteString
- fromDotDecimalText' :: Text -> Either String Word32
- fromDotDecimalText :: Text -> Maybe Word32
- rangeFromDotDecimalText' :: (Word32 -> Word8 -> a) -> Text -> Either String a
- rangeFromDotDecimalText :: (Word32 -> Word8 -> a) -> Text -> Maybe a
- dotDecimalRangeParser :: (Word32 -> Word8 -> a) -> Parser a
- dotDecimalParser :: Parser Word32
- fromOctets' :: Word32 -> Word32 -> Word32 -> Word32 -> Word32
- mask :: Word8 -> Word32
- p24 :: Word32
- p20 :: Word32
- p16 :: Word32
- mask8 :: Word32
- mask4 :: Word32
- mask12 :: Word32
- mask20 :: Word32
- mask28 :: Word32
- mask16 :: Word32
- mask10 :: Word32
- mask24 :: Word32
- mask32 :: Word32
- mask15 :: Word32
Documentation
rightToMaybe :: Either a b -> Maybe b Source #
toDotDecimalText :: Word32 -> Text Source #
toDotDecimalBuilder :: Word32 -> Builder Source #
toTextPreAllocated :: Word32 -> Text Source #
I think that this function can be improved. Right now, it always allocates enough space for a fifteen-character text rendering of an IP address. I think that it should be possible to do more of the math upfront and allocate less space.
dotDecimalParser :: Parser Word32 Source #
This does not do an endOfInput check because it is reused in the range parser implementation.