technique-0.2.5: Procedures and Sequences
Safe HaskellNone
LanguageHaskell2010

Technique.Failure

Description

Error messages from compiling.

Synopsis

Documentation

data Status Source #

Instances

Instances details
Render Status Source # 
Instance details

Defined in Technique.Failure

Associated Types

type Token Status #

type Token Status Source # 
Instance details

Defined in Technique.Failure

data Source Source #

Instances

Instances details
Eq Source Source # 
Instance details

Defined in Technique.Failure

Methods

(==) :: Source -> Source -> Bool #

(/=) :: Source -> Source -> Bool #

Ord Source Source # 
Instance details

Defined in Technique.Failure

Show Source Source # 
Instance details

Defined in Technique.Failure

Render Source Source # 
Instance details

Defined in Technique.Failure

Associated Types

type Token Source #

Located Source Source # 
Instance details

Defined in Technique.Failure

type Token Source Source # 
Instance details

Defined in Technique.Failure

data FailureReason Source #

fancyPunctuate :: [Doc ann] -> [Doc ann] Source #

formatErrorItem :: TechniqueToken -> ErrorItem Char -> Doc TechniqueToken Source #

ErrorItem is a bit overbearing, but we handle its four cases by saying single quotes around characters, double quotes around strings, no quotes around labels (descriptive text) and hard code the end of input and newline cases.

extractErrorBundle :: Source -> ParseErrorBundle Text Void -> CompilationError Source #

When we get a failure in the parsing stage **megaparsec** returns a ParseErrorBundle. Extract the first error message therein (later handle more? Yeah nah), and convert it into something we can use.