futhark-data-1.0.3.0: An implementation of the Futhark data format.
Safe HaskellNone
LanguageHaskell2010

Futhark.Data.Parser

Description

Megaparsec-based parser for Values in the textual value format. The difference between this and the reader defined in Futhark.Data.Reader is that we don't try to handle both the textual and binary format - only the former. On the other hand, this parser has (much) better error messages and can be easily used by other parsers (like the ones for FutharkScript or test blocks).

Synopsis

Documentation

parsePrimType :: Parsec Void Text PrimType Source #

Parse the name of a primitive type. Does *not* consume any trailing whitespace, nor does it permit any internal whitespace.

parseType :: Parsec Void Text ValueType Source #

Parse a type. Does *not* consume any trailing whitespace, nor does it permit any internal whitespace.

parsePrimValue :: Parsec Void Text Value Source #

Parse a primitive value. Does *not* consume any trailing whitespace, nor does it permit any internal whitespace.

parseValue :: Parsec Void Text () -> Parsec Void Text Value Source #

Parse a value, given a post-lexeme parser for whitespace.