futhark-0.19.4: An optimising compiler for a functional, array-oriented language.
Safe HaskellNone
LanguageHaskell2010

Futhark.Test.Values.Parser

Description

Megaparsec-based parser for primitive Values. The difference between this and the parser defined in Futhark.Test.Values 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 :: Parser PrimType Source #

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

parseType :: Parser ValueType Source #

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

parsePrimValue :: Parser PrimValue Source #

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

parseValue :: Parser () -> Parser Value Source #

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