Jikka-5.5.0.0: A transpiler from Python to C++ for competitive programming
Copyright(c) Kimiyuki Onaka 2020
LicenseApache License 2.0
Maintainerkimiyuki95@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Jikka.Common.Error

Description

 
Synopsis

Documentation

error data types

data ErrorGroup Source #

Constructors

LexicalError

It's impossible to split the given source text into tokens.

SyntaxError

It's impossible to construct AST from tokens.

SymbolError

There are undefined variables or functions in AST.

TypeError

It's impossible reconstruct types for AST.

SemanticError

other semantic erros

EvaluationError

User's program are not ready to evaluate.

RuntimeError

User's program failed while running.

AssertionError

User's program violates its assertion.

CommandLineError

The given command line arguments are not acceptable.

WrongInputError

User's program was correctly running but wrong input text is given.

InternalError

It's an bug of implementation.

data Error Source #

Instances

Instances details
Eq Error Source # 
Instance details

Defined in Jikka.Common.Error

Methods

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

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

Ord Error Source # 
Instance details

Defined in Jikka.Common.Error

Methods

compare :: Error -> Error -> Ordering #

(<) :: Error -> Error -> Bool #

(<=) :: Error -> Error -> Bool #

(>) :: Error -> Error -> Bool #

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

max :: Error -> Error -> Error #

min :: Error -> Error -> Error #

Read Error Source # 
Instance details

Defined in Jikka.Common.Error

Show Error Source # 
Instance details

Defined in Jikka.Common.Error

Methods

showsPrec :: Int -> Error -> ShowS #

show :: Error -> String #

showList :: [Error] -> ShowS #

Semigroup Error Source # 
Instance details

Defined in Jikka.Common.Error

Methods

(<>) :: Error -> Error -> Error #

sconcat :: NonEmpty Error -> Error #

stimes :: Integral b => b -> Error -> Error #

general utilities for Except

wrapError :: MonadError e m => (e -> e) -> m a -> m a Source #

wrapError' :: MonadError Error m => String -> m a -> m a Source #

wrapAt :: MonadError Error m => Loc -> m a -> m a Source #

wrapAt' :: MonadError Error m => Maybe Loc -> m a -> m a Source #

maybeToError :: MonadError a m => a -> Maybe b -> m b Source #

eitherToError :: MonadError a m => Either a b -> m b Source #

utilities to report multiple errors

catchError' :: MonadError e m => m a -> m (Either e a) Source #

catchError` is the inverse of liftError.

reportErrors4 :: MonadError Error m => Either Error a -> Either Error b -> Either Error c -> Either Error d -> m (a, b, c, d) Source #

reportErrors5 :: MonadError Error m => Either Error a -> Either Error b -> Either Error c -> Either Error d -> Either Error e -> m (a, b, c, d, e) Source #

function to construct errors

actions to throw errors

utilities for other types of errors

bug :: String -> a Source #