Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type Get a = forall m. MonadGet m => m a
- type Put a = forall m. MonadPut m => a -> m ()
- data Format a = Format {}
- debug :: Bool
- getFromBytes :: Get a -> ByteString -> Maybe a
- getFromFile :: MonadIO m => Get a -> FilePath -> m (Maybe a)
- getFromFile' :: MonadIO m => Get a -> FilePath -> m (Either String a)
- putBytes :: Put a -> a -> ByteString
- putWithParentDirs :: MonadIO m => Put a -> FilePath -> a -> m ()
- putVarInt :: (MonadPut m, Integral a, Bits a) => a -> m ()
- getVarInt :: (MonadGet m, Num b, Bits b) => m b
- putText :: MonadPut m => Text -> m ()
- getText :: MonadGet m => m Text
- skipText :: MonadGet m => m ()
- putShortText :: MonadPut m => ShortText -> m ()
- getShortText :: MonadGet m => m ShortText
- putShortByteString :: MonadPut m => ShortByteString -> m ()
- getShortByteString :: MonadGet m => Int -> m ShortByteString
- putFoldable :: (Foldable f, MonadPut m) => (a -> m ()) -> f a -> m ()
- getList :: MonadGet m => m a -> m [a]
- getListLength :: MonadGet m => m Int
- getVector :: MonadGet m => m a -> m (Vector a)
- skipVector :: MonadGet m => m a -> m ()
- getSequence :: MonadGet m => m a -> m (Seq a)
- getSet :: (MonadGet m, Ord a) => m a -> m (Set a)
- putMap :: MonadPut m => (a -> m ()) -> (b -> m ()) -> Map a b -> m ()
- addToExistingMap :: (MonadGet m, Ord a) => m a -> m b -> Map a b -> m (Map a b)
- getMap :: (MonadGet m, Ord a) => m a -> m b -> m (Map a b)
- getFramedByteString :: MonadGet m => m ByteString
- getRemainingByteString :: MonadGet m => m ByteString
- getFramed :: MonadGet m => Get a -> m a
- putFramedByteString :: MonadPut m => ByteString -> m ()
- putFramed :: MonadPut m => Put a -> a -> m ()
- skipFramed :: MonadGet m => m ()
- putFramedArray :: (MonadPut m, Foldable f) => Put a -> f a -> m ()
- getFramedArray :: MonadGet m => m a -> m (Vector a)
- lookupFramedArray :: MonadGet m => m a -> Int -> m (Maybe a)
- lengthFramedArray :: MonadGet m => m Word64
- unsafeFramedArrayLookup :: MonadGet m => m a -> Int -> m a
- putPair :: MonadPut m => (a -> m ()) -> (b -> m ()) -> (a, b) -> m ()
- getPair :: MonadGet m => m a -> m b -> m (a, b)
- getTuple3 :: MonadGet m => m a -> m b -> m c -> m (a, b, c)
Documentation
getFromBytes :: Get a -> ByteString -> Maybe a Source #
putBytes :: Put a -> a -> ByteString Source #
putShortText :: MonadPut m => ShortText -> m () Source #
getShortText :: MonadGet m => m ShortText Source #
putShortByteString :: MonadPut m => ShortByteString -> m () Source #
the binary
package has a native version of this,
which may be more efficient by a constant factor
getShortByteString :: MonadGet m => Int -> m ShortByteString Source #
the binary
package has a native version of this,
which may be more efficient by a constant factor
putFoldable :: (Foldable f, MonadPut m) => (a -> m ()) -> f a -> m () Source #
getListLength :: MonadGet m => m Int Source #
skipVector :: MonadGet m => m a -> m () Source #
getSequence :: MonadGet m => m a -> m (Seq a) Source #
getFramedByteString :: MonadGet m => m ByteString Source #
getRemainingByteString :: MonadGet m => m ByteString Source #
putFramedByteString :: MonadPut m => ByteString -> m () Source #
skipFramed :: MonadGet m => m () Source #
getFramedArray :: MonadGet m => m a -> m (Vector a) Source #
lookupFramedArray :: MonadGet m => m a -> Int -> m (Maybe a) Source #
Look up a 0-based index in a framed array, O(num array elements), because it reads the start indices for all elements first. This could be skipped if the indices had a fixed size instead of varint
lengthFramedArray :: MonadGet m => m Word64 Source #
unsafeFramedArrayLookup :: MonadGet m => m a -> Int -> m a Source #