Safe Haskell | None |
---|---|
Language | Haskell2010 |
Parsers for PLC terms in DefaultUni.
Synopsis
- parseProgram :: ByteString -> Either (ParseErrorBundle Text ParseError) (Program TyName Name DefaultUni DefaultFun SourcePos)
- parseTerm :: ByteString -> Either (ParseErrorBundle Text ParseError) (Term TyName Name DefaultUni DefaultFun SourcePos)
- parseType :: ByteString -> Either (ParseErrorBundle Text ParseError) (Type TyName DefaultUni SourcePos)
- data ParseError
- = UnknownBuiltinType Text SourcePos
- | BuiltinTypeNotAStar Text SourcePos
- | UnknownBuiltinFunction Text SourcePos
- | InvalidBuiltinConstant Text Text SourcePos
Documentation
parseProgram :: ByteString -> Either (ParseErrorBundle Text ParseError) (Program TyName Name DefaultUni DefaultFun SourcePos) Source #
Parse a PLC program. The resulting program will have fresh names. The underlying monad must be capable of handling any parse errors.
parseTerm :: ByteString -> Either (ParseErrorBundle Text ParseError) (Term TyName Name DefaultUni DefaultFun SourcePos) Source #
Parse a PLC term. The resulting program will have fresh names. The underlying monad must be capable of handling any parse errors.
parseType :: ByteString -> Either (ParseErrorBundle Text ParseError) (Type TyName DefaultUni SourcePos) Source #
Parse a PLC type. The resulting program will have fresh names. The underlying monad must be capable of handling any parse errors.
data ParseError Source #
An error encountered during parsing.
UnknownBuiltinType Text SourcePos | |
BuiltinTypeNotAStar Text SourcePos | |
UnknownBuiltinFunction Text SourcePos | |
InvalidBuiltinConstant Text Text SourcePos |