nauty-parser-1.0.0.0: Parse/encode graph6, digraph6 and sparse6 formats (nauty).
Copyright(c) Marcelo Garlet Milani 2026
LicenseMIT
Maintainermgmilani@pm.me
Stabilityunstable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Nauty.Internal.Parsing

Description

This module contains internal functions used by other modules. Except for test cases, you should not import this module.

Synopsis

Documentation

consume :: Word64 -> StateT ByteString (Either Text) ByteString Source #

Read the given number of bytes.

consumeWhile :: (Word8 -> Bool) -> StateT ByteString (Either Text) ByteString Source #

Read bytes until the given condition evaluates to false.

parseNumber :: StateT ByteString (Either Text) Word64 Source #

Parse a single number.

bigendian :: ByteString -> Word64 Source #

Parse a single number with big-endian encoding.

parseVector :: Word64 -> StateT ByteString (Either Text) ByteString Source #

Parse a vector with the given amount bits.

append6Bits :: ([Word8], Word8) -> Word8 -> ([Word8], Word8) Source #

Put 6 bits to a list of bytes.

header :: Text -> Text -> Text Source #

Parse an optional header. Returns the rest of the file.

ignoreHeader :: Text -> Text Source #

Skips the header. Returns the rest of the text.