Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
An interface for reporting "impossible" errors
Synopsis
- data Impossible
- throwImpossible :: Impossible -> a
- catchImpossible :: IO a -> (Impossible -> IO a) -> IO a
Documentation
data Impossible Source #
"Impossible" errors, annotated with a file name and a line number corresponding to the source code location of the error.
Impossible String Integer | We reached a program point which should be unreachable. |
Unreachable String Integer |
|
Instances
Show Impossible Source # | |
Defined in Agda.Utils.Impossible showsPrec :: Int -> Impossible -> ShowS # show :: Impossible -> String # showList :: [Impossible] -> ShowS # | |
Exception Impossible Source # | |
Defined in Agda.Utils.Impossible toException :: Impossible -> SomeException # fromException :: SomeException -> Maybe Impossible # displayException :: Impossible -> String # | |
EmbPrj Impossible Source # | |
Defined in Agda.TypeChecking.Serialise.Instances.Common |
throwImpossible :: Impossible -> a Source #
Abort by throwing an "impossible" error. You should not use
this function directly. Instead use the macro in undefined.h
.
catchImpossible :: IO a -> (Impossible -> IO a) -> IO a Source #
Catch an "impossible" error, if possible.