module Nanopass.Internal.Error
( Error(..)
) where
import Nanopass.Internal.Representation (LowName,UpName,UpDotName)
import Text.SExpression (SExpr)
data Error
= SExprError String
| ExpectingLanguage SExpr
| ExpectedLangLHS SExpr
| ExpectedLangName String
| ExpectingTypeVariable SExpr
| ExpectingBaseLanguage (Maybe SExpr)
| ExpectingKwFromAfterLHS SExpr
| UnexpectedSExprAfterDelete SExpr
| ExpectingPlusMinusStar SExpr
| ExpectingNontermsEdit SExpr
| ExpectingPlusMinus SExpr
| ExpectingProductionsEdit SExpr
| ExpectedNontermName (Maybe SExpr)
| ExpectedNonterm SExpr
| ExpectedConstructorName (Maybe SExpr)
| ExpectedProduction SExpr
| ExpectingTypeNameOrVar String
| ExpectedTypeConstructor SExpr
| UnexpectedLiteral SExpr
| ConsListsDisallowed SExpr
| UnexpectedTypeApplicationstoRecursiveType UpName
| DuplicateLanguageParams [LowName]
| UnrecognizedNonterm UpName
| UnrecognizedTypeVariable LowName
| IllegalNontermAddedAlsoDeleted UpName
| IllegalNontermModificationAlsoAdded UpName
| IllegalNontermModificationAlsoDeleted UpName
| IllegalNontermAdded UpName
| IllegalNontermModified UpName
| IllegalNontermDeleted UpName
| DuplicateNontermMods [UpName]
| IllegalProductionAdded UpName
| IllegalProductionDeleted UpName
| MissingFromTo SExpr
| UnexpectedSExprAfterPass UpDotName UpDotName
| ExpectedUpDotNameAfterFrom SExpr
| ExpectedUpDotNameAfterTo SExpr
deriving (Int -> Error -> ShowS
[Error] -> ShowS
Error -> String
(Int -> Error -> ShowS)
-> (Error -> String) -> ([Error] -> ShowS) -> Show Error
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Error -> ShowS
showsPrec :: Int -> Error -> ShowS
$cshow :: Error -> String
show :: Error -> String
$cshowList :: [Error] -> ShowS
showList :: [Error] -> ShowS
Show)