    {-# LANGUAGE DeriveDataTypeable #-}
    {-# LANGUAGE DeriveGeneric #-}

    module SDL.Exception
      ( SDLException(..)
      ) where

    import Control.Exception
    import Data.Data (Data)
    import Data.Text (Text)
    import Data.Typeable (Typeable)
    import GHC.Generics (Generic)

    -- | Error details about a failure to call an SDL routine. Almost all functions in this library have the
    -- ability to produce exceptions of this type. Inspection should help you learn more about what has
    -- gone wrong.
    data SDLException
      = -- | A call to a low-level SDL C function failed unexpectedly.
        SDLCallFailed
        {SDLException -> Text
    sdlExceptionCaller :: !Text
         -- ^ The Haskell routine that was trying to call a C function
        ,SDLException -> Text
    sdlFunction :: !Text
         -- ^ The C function that was called and produced an error
        ,SDLException -> Text
    sdlExceptionError :: !Text
        -- ^ SDL's understanding of what has gone wrong
        }
      | -- | An SDL C function was called with an unexpected argument.
        SDLUnexpectedArgument
        {sdlExceptionCaller :: !Text
         -- ^ The Haskell routine that was trying to call a C function
        ,sdlFunction :: !Text
         -- ^ The C function that was called and produced an error
        ,SDLException -> String
    sdlUnknownValue :: !String
         -- ^ The argument that SDL failed to understand
        }
      | -- | A hint was attempted to be set, but SDL does not know about this hint.
        SDLUnknownHintValue
        {SDLException -> String
    sdlHint :: !String
         -- ^ The hint that could not be set
        ,sdlUnknownValue :: !String
         -- ^ The value that could not be set
        }
      deriving (Typeable SDLException
    Typeable SDLException
    -> (forall (c :: Type -> Type).
        (forall d b. Data d => c (d -> b) -> d -> c b)
        -> (forall g. g -> c g) -> SDLException -> c SDLException)
    -> (forall (c :: Type -> Type).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c SDLException)
    -> (SDLException -> Constr)
    -> (SDLException -> DataType)
    -> (forall (t :: Type -> Type) (c :: Type -> Type).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c SDLException))
    -> (forall (t :: Type -> Type -> Type) (c :: Type -> Type).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c SDLException))
    -> ((forall b. Data b => b -> b) -> SDLException -> SDLException)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> SDLException -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> SDLException -> r)
    -> (forall u. (forall d. Data d => d -> u) -> SDLException -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> SDLException -> u)
    -> (forall (m :: Type -> Type).
        Monad m =>
        (forall d. Data d => d -> m d) -> SDLException -> m SDLException)
    -> (forall (m :: Type -> Type).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> SDLException -> m SDLException)
    -> (forall (m :: Type -> Type).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> SDLException -> m SDLException)
    -> Data SDLException
    SDLException -> Constr
    SDLException -> DataType
    (forall b. Data b => b -> b) -> SDLException -> SDLException
    forall a.
    Typeable a
    -> (forall (c :: Type -> Type).
        (forall d b. Data d => c (d -> b) -> d -> c b)
        -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: Type -> Type).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: Type -> Type) (c :: Type -> Type).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: Type -> Type -> Type) (c :: Type -> Type).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: Type -> Type).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: Type -> Type).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: Type -> Type).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> SDLException -> u
    forall u. (forall d. Data d => d -> u) -> SDLException -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> SDLException -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> SDLException -> r
    forall (m :: Type -> Type).
    Monad m =>
    (forall d. Data d => d -> m d) -> SDLException -> m SDLException
    forall (m :: Type -> Type).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SDLException -> m SDLException
    forall (c :: Type -> Type).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c SDLException
    forall (c :: Type -> Type).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> SDLException -> c SDLException
    forall (t :: Type -> Type) (c :: Type -> Type).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c SDLException)
    forall (t :: Type -> Type -> Type) (c :: Type -> Type).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c SDLException)
    $cgfoldl :: forall (c :: Type -> Type).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> SDLException -> c SDLException
    gfoldl :: forall (c :: Type -> Type).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> SDLException -> c SDLException
    $cgunfold :: forall (c :: Type -> Type).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c SDLException
    gunfold :: forall (c :: Type -> Type).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c SDLException
    $ctoConstr :: SDLException -> Constr
    toConstr :: SDLException -> Constr
    $cdataTypeOf :: SDLException -> DataType
    dataTypeOf :: SDLException -> DataType
    $cdataCast1 :: forall (t :: Type -> Type) (c :: Type -> Type).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c SDLException)
    dataCast1 :: forall (t :: Type -> Type) (c :: Type -> Type).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c SDLException)
    $cdataCast2 :: forall (t :: Type -> Type -> Type) (c :: Type -> Type).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c SDLException)
    dataCast2 :: forall (t :: Type -> Type -> Type) (c :: Type -> Type).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c SDLException)
    $cgmapT :: (forall b. Data b => b -> b) -> SDLException -> SDLException
    gmapT :: (forall b. Data b => b -> b) -> SDLException -> SDLException
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> SDLException -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> SDLException -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> SDLException -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> SDLException -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> SDLException -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> SDLException -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SDLException -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SDLException -> u
    $cgmapM :: forall (m :: Type -> Type).
    Monad m =>
    (forall d. Data d => d -> m d) -> SDLException -> m SDLException
    gmapM :: forall (m :: Type -> Type).
    Monad m =>
    (forall d. Data d => d -> m d) -> SDLException -> m SDLException
    $cgmapMp :: forall (m :: Type -> Type).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SDLException -> m SDLException
    gmapMp :: forall (m :: Type -> Type).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SDLException -> m SDLException
    $cgmapMo :: forall (m :: Type -> Type).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SDLException -> m SDLException
    gmapMo :: forall (m :: Type -> Type).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> SDLException -> m SDLException
    Data,SDLException -> SDLException -> Bool
    (SDLException -> SDLException -> Bool)
    -> (SDLException -> SDLException -> Bool) -> Eq SDLException
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: SDLException -> SDLException -> Bool
    == :: SDLException -> SDLException -> Bool
    $c/= :: SDLException -> SDLException -> Bool
    /= :: SDLException -> SDLException -> Bool
    Eq,(forall x. SDLException -> Rep SDLException x)
    -> (forall x. Rep SDLException x -> SDLException)
    -> Generic SDLException
    forall x. Rep SDLException x -> SDLException
    forall x. SDLException -> Rep SDLException x
    forall a.
    (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
    $cfrom :: forall x. SDLException -> Rep SDLException x
    from :: forall x. SDLException -> Rep SDLException x
    $cto :: forall x. Rep SDLException x -> SDLException
    to :: forall x. Rep SDLException x -> SDLException
    Generic,Eq SDLException
    Eq SDLException
    -> (SDLException -> SDLException -> Ordering)
    -> (SDLException -> SDLException -> Bool)
    -> (SDLException -> SDLException -> Bool)
    -> (SDLException -> SDLException -> Bool)
    -> (SDLException -> SDLException -> Bool)
    -> (SDLException -> SDLException -> SDLException)
    -> (SDLException -> SDLException -> SDLException)
    -> Ord SDLException
    SDLException -> SDLException -> Bool
    SDLException -> SDLException -> Ordering
    SDLException -> SDLException -> SDLException
    forall a.
    Eq a
    -> (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    $ccompare :: SDLException -> SDLException -> Ordering
    compare :: SDLException -> SDLException -> Ordering
    $c< :: SDLException -> SDLException -> Bool
    < :: SDLException -> SDLException -> Bool
    $c<= :: SDLException -> SDLException -> Bool
    <= :: SDLException -> SDLException -> Bool
    $c> :: SDLException -> SDLException -> Bool
    > :: SDLException -> SDLException -> Bool
    $c>= :: SDLException -> SDLException -> Bool
    >= :: SDLException -> SDLException -> Bool
    $cmax :: SDLException -> SDLException -> SDLException
    max :: SDLException -> SDLException -> SDLException
    $cmin :: SDLException -> SDLException -> SDLException
    min :: SDLException -> SDLException -> SDLException
    Ord,ReadPrec [SDLException]
    ReadPrec SDLException
    Int -> ReadS SDLException
    ReadS [SDLException]
    (Int -> ReadS SDLException)
    -> ReadS [SDLException]
    -> ReadPrec SDLException
    -> ReadPrec [SDLException]
    -> Read SDLException
    forall a.
    (Int -> ReadS a)
    -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
    $creadsPrec :: Int -> ReadS SDLException
    readsPrec :: Int -> ReadS SDLException
    $creadList :: ReadS [SDLException]
    readList :: ReadS [SDLException]
    $creadPrec :: ReadPrec SDLException
    readPrec :: ReadPrec SDLException
    $creadListPrec :: ReadPrec [SDLException]
    readListPrec :: ReadPrec [SDLException]
    Read,Int -> SDLException -> ShowS
    [SDLException] -> ShowS
    SDLException -> String
    (Int -> SDLException -> ShowS)
    -> (SDLException -> String)
    -> ([SDLException] -> ShowS)
    -> Show SDLException
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> SDLException -> ShowS
    showsPrec :: Int -> SDLException -> ShowS
    $cshow :: SDLException -> String
    show :: SDLException -> String
    $cshowList :: [SDLException] -> ShowS
    showList :: [SDLException] -> ShowS
    Show,Typeable)

    instance Exception SDLException