futhark-0.25.12: An optimising compiler for a functional, array-oriented language.
Safe HaskellSafe-Inferred
LanguageGHC2021

Language.Futhark.Primitive.Parse

Description

Parsers for primitive values and types.

Synopsis

Documentation

pPrimValue :: Parsec Void Text PrimValue Source #

Defined in this module for convenience.

pPrimType :: Parsec Void Text PrimType Source #

Parse a primitive type.

pFloatType :: Parsec Void Text FloatType Source #

Parse a floating-point type.

pIntType :: Parsec Void Text IntType Source #

Parse an integer type.

Building blocks

constituent :: Char -> Bool Source #

Is this character a valid member of an identifier?

lexeme :: Parsec Void Text a -> Parsec Void Text a Source #

Consume whitespace after the provided parser, if it succeeds.

keyword :: Text -> Parsec Void Text () Source #

keyword k parses k, which must not be immediately followed by a constituent character. This ensures that iff is not seen as the if keyword followed by f. Sometimes called the "maximum munch" rule.

whitespace :: Parsec Void Text () Source #

Consume whitespace (including skipping line comments).