agda-unused-0.2.0: Check for unused code in an Agda project.
Safe HaskellNone
LanguageHaskell2010

Agda.Unused.Monad.Error

Description

An error monad for determining unused code.

Synopsis

Definitions

data Error where Source #

An error encountered while checking for unused code.

Constructors

ErrorAmbiguous :: !Range -> !QName -> Error

Ambiguous lookup.

ErrorCyclic :: !Range -> !QName -> Error

Cyclic module dependency.

ErrorDeclaration :: !DeclarationException -> Error

Agda declaration exception.

ErrorFile :: !FilePath -> Error

File not found.

ErrorFind :: !Range -> !QName -> !FindError -> Error

Agda find error.

ErrorFixity :: !(Maybe Range) -> Error

Agda fixity exception.

ErrorGlobal :: !Range -> Error

Illegal declaration in main module of global check.

ErrorInclude :: Error

Error in computing include paths.

ErrorInternal :: !InternalError -> Error

Internal error; should be reported.

ErrorOpen :: !Range -> !QName -> Error

Module not found in open statement.

ErrorParse :: !ParseError -> Error

Agda parse error.

ErrorPolarity :: !(Maybe Range) -> Error

Agda polarity error.

ErrorRoot :: !QName -> !QName -> Error

Root not found.

ErrorUnsupported :: !UnsupportedError -> !Range -> Error

Unsupported language feature.

data InternalError where Source #

An internal error, indicating a bug in our code. This type of error should be reported by filing an issue.

Constructors

ErrorConstructor :: !Range -> InternalError

Unexpected declaration type for constructor.

ErrorMacro :: !Range -> InternalError

Unexpected arguments to SectionApp constructor.

ErrorModuleName :: !FilePath -> InternalError

Unexpected empty top level module name.

ErrorName :: !Range -> InternalError

Unexpected underscore as name.

ErrorRenaming :: !Range -> InternalError

Unexpected name-module mismatch in renaming statement.

ErrorUnexpected :: !UnexpectedError -> !Range -> InternalError

Unexpected data type constructor.

Instances

Instances details
Show InternalError Source # 
Instance details

Defined in Agda.Unused.Monad.Error

data UnsupportedError where Source #

An error indicating that an unsupported language was found.

Constructors

UnsupportedMacro :: UnsupportedError

Record module instance applications.

UnsupportedUnquote :: UnsupportedError

Unquoting primitives.

Instances

Instances details
Show UnsupportedError Source # 
Instance details

Defined in Agda.Unused.Monad.Error

Lift

liftLookup :: MonadError Error m => Range -> QName -> Either LookupError a -> m a Source #

Lift a lookup result to our error monad.

Orphan instances