language-ninja-0.2.0: A library for dealing with the Ninja build language.

CopyrightCopyright 2017 Awake Security
LicenseApache-2.0
Maintaineropensource@awakesecurity.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Language.Ninja.Errors.Parser

Contents

Description

Errors thrown during Ninja parsing.

Since: 0.1.0

Synopsis

ParseError

data ParseError Source #

The type of errors encountered during parsing.

Since: 0.1.0

Constructors

GenericParseError !Text

Generic catch-all error constructor. Avoid using this.

Since: 0.1.0

LexBindingFailure !Text
Lexer failed at binding: text

Since: 0.1.0

LexExpectedColon
Expected a colon

Since: 0.1.0

LexUnexpectedDollar
Unexpected $ followed by unexpected stuff

Since: 0.1.0

LexUnexpectedSeparator Char

Lexer expected a separator character but found something else

Since: 0.1.0

LexParsecError !(ParseError Char Dec)

Any other lexer error.

Since: 0.1.0

ParseBadDepthField !Text
Could not parse depth field in pool, got: text

Since: 0.1.0

ParseUnexpectedBinding !Text
Unexpected binding defining text

Since: 0.1.0

Instances

Eq ParseError Source # 
Show ParseError Source # 
Generic ParseError Source # 

Associated Types

type Rep ParseError :: * -> * #

ToJSON ParseError Source #

Converts to {tag: …, value: …}.

Since: 0.1.0

Exception ParseError Source #

Default instance.

Since: 0.1.0

type Rep ParseError Source # 

throwGenericParseError :: MonadError ParseError m => Text -> m a Source #

Throw a generic catch-all ParseError.

Since: 0.1.0

throwLexBindingFailure :: MonadError ParseError m => Text -> m a Source #

Throw a LexBindingFailure error.

Since: 0.1.0

throwLexExpectedColon :: MonadError ParseError m => m a Source #

Throw a LexExpectedColon error.

Since: 0.1.0

throwLexUnexpectedDollar :: MonadError ParseError m => m a Source #

Throw a LexUnexpectedColon error.

Since: 0.1.0