futhark-0.20.0: An optimising compiler for a functional, array-oriented language.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Futhark.Error

Description

Futhark error definitions.

Synopsis

Documentation

data CompilerError Source #

A compiler error.

Constructors

ExternalError Doc

An error that happened due to something the user did, such as provide incorrect code or options.

InternalError Text Text ErrorClass

An internal compiler error. The second text is extra data for debugging, which can be written to a file.

Instances

Instances details
Show CompilerError Source # 
Instance details

Defined in Futhark.Error

MonadError CompilerError FutharkM Source # 
Instance details

Defined in Futhark.Pipeline

data ErrorClass Source #

There are two classes of internal errors: actual bugs, and implementation limitations. The latter are already known and need not be reported.

Instances

Instances details
Eq ErrorClass Source # 
Instance details

Defined in Futhark.Error

Ord ErrorClass Source # 
Instance details

Defined in Futhark.Error

Show ErrorClass Source # 
Instance details

Defined in Futhark.Error

externalError :: MonadError CompilerError m => Doc -> m a Source #

Raise an ExternalError based on a prettyprinting result.

externalErrorS :: MonadError CompilerError m => String -> m a Source #

Raise an ExternalError based on a string.

data InternalError Source #

An error that is not the users fault, but a bug (or limitation) in the compiler. Compiler passes should only ever report this error - any problems after the type checker are *our* fault, not the users. These are generally thrown as IO exceptions, and caught at the top level.

Constructors

Error ErrorClass Text 

compilerBug :: Text -> a Source #

Throw an InternalError that is a CompilerBug.

compilerBugS :: String -> a Source #

Like compilerBug, but with a String.

internalErrorS :: MonadError CompilerError m => String -> Doc -> m a Source #

Raise an InternalError based on a prettyprinting result.