packstream-0.1.0.2: PackStream converter for Neo4j BOLT protocol
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.PackStream.Internal.Code

Synopsis

Checkers

isNull :: Word8 -> Bool Source #

Checks whether the represented data is ()

isBool :: Word8 -> Bool Source #

Checks whether the represented data is Bool

isInt :: Word8 -> Bool Source #

Checks whether the represented data is Int

isFloat :: Word8 -> Bool Source #

Checks whether the represented data is Double

isBytes :: Word8 -> Bool Source #

Checks whether the represented data is ByteString

isString :: Word8 -> Bool Source #

Checks whether the represented data is Text

isList :: Word8 -> Bool Source #

Checks whether the represented data is '[Value]'

isDict :: Word8 -> Bool Source #

Checks whether the represented data is 'Map Text Value'

isStructure :: Word8 -> Bool Source #

Checks whether the represented data is Structure

Helper functions

tinySize :: Word8 -> Int Source #

Extracts the size of tiny collection (Text, '[Value]' or 'Map Text Value')

isSmth :: (Foldable t, Functor t) => t (b -> Bool) -> b -> Bool Source #

Gets the collection of predicates and checks whether any is True on some data

Codes