modulo-1.9.0: Modular C code generator

PortabilityGHC
Stabilityexperimental
Maintainerhans@hanshoglund.se
Safe HaskellNone

Language.Modulo.Parse

Description

Parser for the module language, as described in Language.Modulo.

Synopsis

Documentation

parse :: String -> Either ParseError ModuleSource

Parse a module description, returning an error if unsuccessful.

parseName :: String -> Either ParseError NameSource

Parse a qualified name, returning an error if unsuccessful.

parsePrimType :: String -> Either ParseError PrimTypeSource

Parse a primitive type, returning an error if unsuccessful.

parsePrimTypeMaybe :: String -> Maybe PrimTypeSource

Parse a primitive type, returning an error if unsuccessful.

unsafeParseFile :: FilePath -> IO ModuleSource

Parse a module description from the given file, or fail if unsuccessful.

This unsafe function should not be used in production code.