Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Futhark error definitions.
Synopsis
- data CompilerError
- data ErrorClass
- externalError :: MonadError CompilerError m => Text -> m a
- externalErrorS :: MonadError CompilerError m => String -> m a
- data InternalError
- internalError :: MonadError CompilerError m => InternalError -> Text -> m a
- compilerBug :: MonadError InternalError m => Text -> m a
- compilerBugS :: MonadError InternalError m => String -> m a
- compilerLimitation :: MonadError InternalError m => Text -> m a
- compilerLimitationS :: MonadError InternalError m => String -> m a
Documentation
data CompilerError Source #
ExternalError Text | 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
Show CompilerError Source # | |
Defined in Futhark.Error showsPrec :: Int -> CompilerError -> ShowS # show :: CompilerError -> String # showList :: [CompilerError] -> ShowS # | |
MonadError CompilerError FutharkM Source # | |
Defined in Futhark.Pipeline throwError :: CompilerError -> FutharkM a # catchError :: FutharkM a -> (CompilerError -> FutharkM a) -> FutharkM a # |
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
Eq ErrorClass Source # | |
Defined in Futhark.Error (==) :: ErrorClass -> ErrorClass -> Bool # (/=) :: ErrorClass -> ErrorClass -> Bool # | |
Ord ErrorClass Source # | |
Defined in Futhark.Error compare :: ErrorClass -> ErrorClass -> Ordering # (<) :: ErrorClass -> ErrorClass -> Bool # (<=) :: ErrorClass -> ErrorClass -> Bool # (>) :: ErrorClass -> ErrorClass -> Bool # (>=) :: ErrorClass -> ErrorClass -> Bool # max :: ErrorClass -> ErrorClass -> ErrorClass # min :: ErrorClass -> ErrorClass -> ErrorClass # | |
Show ErrorClass Source # | |
Defined in Futhark.Error showsPrec :: Int -> ErrorClass -> ShowS # show :: ErrorClass -> String # showList :: [ErrorClass] -> ShowS # |
externalError :: MonadError CompilerError m => Text -> m a Source #
externalErrorS :: MonadError CompilerError m => String -> m a Source #
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.
Instances
MonadError InternalError PassM Source # | |
Defined in Futhark.Pass throwError :: InternalError -> PassM a # catchError :: PassM a -> (InternalError -> PassM a) -> PassM a # | |
MonadError InternalError (ImpM lore op) Source # | |
Defined in Futhark.CodeGen.ImpGen throwError :: InternalError -> ImpM lore op a # catchError :: ImpM lore op a -> (InternalError -> ImpM lore op a) -> ImpM lore op a # |
internalError :: MonadError CompilerError m => InternalError -> Text -> m a Source #
compilerBug :: MonadError InternalError m => Text -> m a Source #
compilerBugS :: MonadError InternalError m => String -> m a Source #
compilerLimitation :: MonadError InternalError m => Text -> m a Source #
compilerLimitationS :: MonadError InternalError m => String -> m a Source #