Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Telescope.Fits.Encoding.MegaHeader
Synopsis
- type Parser = Parsec Void ByteString
- type ParseErr = ParseErrorBundle ByteString Void
- runNextParser :: String -> ByteString -> Parser a -> Either ParseErr (a, ByteString)
- showParseError :: ParseErr -> String
- toWord :: Char -> Word8
- wordsText :: [Word8] -> Text
- parseHeader :: Parser Header
- parseRecordLine :: Parser HeaderRecord
- parseLineHistory :: Parser Text
- parseKeywordRecord :: Parser KeywordRecord
- parseKeywordRecord' :: ByteString -> Parser a -> Parser a
- withComments :: Parser a -> Parser (a, Maybe Text)
- ignoreComments :: Parser a -> Parser a
- parseKeywordValue :: Parser (Text, Value)
- parseLineEnd :: Int -> Parser (Maybe Text)
- untilLineEnd :: Int -> Parser Word8 -> Parser Text
- spacesToLineEnd :: Int -> Parser ()
- parseInlineComment :: Int -> Parser Text
- parseLineComment :: Parser Text
- parseLineCommentSpaces :: Parser Text
- parseLineBlank :: Parser ()
- parseKeyword :: Parser Text
- parseValue :: Parser Value
- parseInt :: Num a => Parser a
- parseFloat :: Parser Double
- parseLogic :: Parser LogicalConstant
- parseStringContinue :: Parser Text
- parseContinue :: Parser Text
- parseStringValue :: Parser Text
- skipEmpty :: Parser ()
- parseEquals :: Parser ()
- parsePos :: Parser Int
- parseBitPix :: Parser BitPix
- parseNaxes :: Parser (Axes Column)
- parseDimensions :: Parser Dimensions
- parsePrimaryKeywords :: Parser Dimensions
- parseImageKeywords :: Parser Dimensions
- parseBinTableKeywords :: Parser (Dimensions, Int)
Documentation
type ParseErr = ParseErrorBundle ByteString Void Source #
runNextParser :: String -> ByteString -> Parser a -> Either ParseErr (a, ByteString) Source #
Runs a single parser and returns the remainder of the input
showParseError :: ParseErr -> String Source #
parseHeader :: Parser Header Source #
Consumes ALL header blocks until end, then all remaining space
parseKeywordRecord' :: ByteString -> Parser a -> Parser a Source #
Parses the specified keyword
withComments :: Parser a -> Parser (a, Maybe Text) Source #
Combinator to allow for parsing a record with inline comments
ignoreComments :: Parser a -> Parser a Source #
spacesToLineEnd :: Int -> Parser () Source #
parseLineBlank :: Parser () Source #
parseKeyword :: Parser Text Source #
Anything but a space or equals
parseValue :: Parser Value Source #
parseEquals :: Parser () Source #
parseDimensions :: Parser Dimensions Source #
We don't parse simple here, because it isn't required on all HDUs