rest-types-1.14.1.2: Silk Rest Framework Types

Safe HaskellNone
LanguageHaskell98

Rest.Types.Error

Synopsis

Documentation

data DataError Source #

Instances

Eq DataError Source # 
Show DataError Source # 
Generic DataError Source # 

Associated Types

type Rep DataError :: * -> * #

ToJSON DataError Source # 
FromJSON DataError Source # 
XmlPickler DataError Source # 

Methods

xpickle :: PU DataError #

JSONSchema DataError Source # 
type Rep DataError Source # 

newtype DomainReason a Source #

Constructors

DomainReason 

Fields

Instances

Functor DomainReason Source # 

Methods

fmap :: (a -> b) -> DomainReason a -> DomainReason b #

(<$) :: a -> DomainReason b -> DomainReason a #

Foldable DomainReason Source # 

Methods

fold :: Monoid m => DomainReason m -> m #

foldMap :: Monoid m => (a -> m) -> DomainReason a -> m #

foldr :: (a -> b -> b) -> b -> DomainReason a -> b #

foldr' :: (a -> b -> b) -> b -> DomainReason a -> b #

foldl :: (b -> a -> b) -> b -> DomainReason a -> b #

foldl' :: (b -> a -> b) -> b -> DomainReason a -> b #

foldr1 :: (a -> a -> a) -> DomainReason a -> a #

foldl1 :: (a -> a -> a) -> DomainReason a -> a #

toList :: DomainReason a -> [a] #

null :: DomainReason a -> Bool #

length :: DomainReason a -> Int #

elem :: Eq a => a -> DomainReason a -> Bool #

maximum :: Ord a => DomainReason a -> a #

minimum :: Ord a => DomainReason a -> a #

sum :: Num a => DomainReason a -> a #

product :: Num a => DomainReason a -> a #

Traversable DomainReason Source # 

Methods

traverse :: Applicative f => (a -> f b) -> DomainReason a -> f (DomainReason b) #

sequenceA :: Applicative f => DomainReason (f a) -> f (DomainReason a) #

mapM :: Monad m => (a -> m b) -> DomainReason a -> m (DomainReason b) #

sequence :: Monad m => DomainReason (m a) -> m (DomainReason a) #

Eq a => Eq (DomainReason a) Source # 
Show a => Show (DomainReason a) Source # 
Generic (DomainReason a) Source # 

Associated Types

type Rep (DomainReason a) :: * -> * #

Methods

from :: DomainReason a -> Rep (DomainReason a) x #

to :: Rep (DomainReason a) x -> DomainReason a #

ToJSON a => ToJSON (DomainReason a) Source # 
FromJSON a => FromJSON (DomainReason a) Source # 
XmlPickler a => XmlPickler (DomainReason a) Source # 

Methods

xpickle :: PU (DomainReason a) #

JSONSchema a => JSONSchema (DomainReason a) Source # 

Methods

schema :: Proxy * (DomainReason a) -> Schema #

type Rep (DomainReason a) Source # 
type Rep (DomainReason a) = D1 * (MetaData "DomainReason" "Rest.Types.Error" "rest-types-1.14.1.2-JLHHv4Ig7oS8l9MMERSVDl" True) (C1 * (MetaCons "DomainReason" PrefixI True) (S1 * (MetaSel (Just Symbol "reason") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a)))

data Status a b Source #

Constructors

Failure a 
Success b 

Instances

Functor (Status a) Source # 

Methods

fmap :: (a -> b) -> Status a a -> Status a b #

(<$) :: a -> Status a b -> Status a a #

Foldable (Status a) Source # 

Methods

fold :: Monoid m => Status a m -> m #

foldMap :: Monoid m => (a -> m) -> Status a a -> m #

foldr :: (a -> b -> b) -> b -> Status a a -> b #

foldr' :: (a -> b -> b) -> b -> Status a a -> b #

foldl :: (b -> a -> b) -> b -> Status a a -> b #

foldl' :: (b -> a -> b) -> b -> Status a a -> b #

foldr1 :: (a -> a -> a) -> Status a a -> a #

foldl1 :: (a -> a -> a) -> Status a a -> a #

toList :: Status a a -> [a] #

null :: Status a a -> Bool #

length :: Status a a -> Int #

elem :: Eq a => a -> Status a a -> Bool #

maximum :: Ord a => Status a a -> a #

minimum :: Ord a => Status a a -> a #

sum :: Num a => Status a a -> a #

product :: Num a => Status a a -> a #

Traversable (Status a) Source # 

Methods

traverse :: Applicative f => (a -> f b) -> Status a a -> f (Status a b) #

sequenceA :: Applicative f => Status a (f a) -> f (Status a a) #

mapM :: Monad m => (a -> m b) -> Status a a -> m (Status a b) #

sequence :: Monad m => Status a (m a) -> m (Status a a) #

(Eq b, Eq a) => Eq (Status a b) Source # 

Methods

(==) :: Status a b -> Status a b -> Bool #

(/=) :: Status a b -> Status a b -> Bool #

(Show b, Show a) => Show (Status a b) Source # 

Methods

showsPrec :: Int -> Status a b -> ShowS #

show :: Status a b -> String #

showList :: [Status a b] -> ShowS #

Generic (Status a b) Source # 

Associated Types

type Rep (Status a b) :: * -> * #

Methods

from :: Status a b -> Rep (Status a b) x #

to :: Rep (Status a b) x -> Status a b #

(ToJSON a, ToJSON b) => ToJSON (Status a b) Source # 

Methods

toJSON :: Status a b -> Value #

toEncoding :: Status a b -> Encoding #

toJSONList :: [Status a b] -> Value #

toEncodingList :: [Status a b] -> Encoding #

(FromJSON a, FromJSON b) => FromJSON (Status a b) Source # 

Methods

parseJSON :: Value -> Parser (Status a b) #

parseJSONList :: Value -> Parser [Status a b] #

(XmlPickler a, XmlPickler b) => XmlPickler (Status a b) Source # 

Methods

xpickle :: PU (Status a b) #

(JSONSchema a, JSONSchema b) => JSONSchema (Status a b) Source # 

Methods

schema :: Proxy * (Status a b) -> Schema #

type Rep (Status a b) Source # 
type Rep (Status a b) = D1 * (MetaData "Status" "Rest.Types.Error" "rest-types-1.14.1.2-JLHHv4Ig7oS8l9MMERSVDl" False) ((:+:) * (C1 * (MetaCons "Failure" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a))) (C1 * (MetaCons "Success" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * b))))

toEither :: Status a b -> Either a b Source #

data Reason a Source #

Instances

Monad Reason Source # 

Methods

(>>=) :: Reason a -> (a -> Reason b) -> Reason b #

(>>) :: Reason a -> Reason b -> Reason b #

return :: a -> Reason a #

fail :: String -> Reason a #

Functor Reason Source # 

Methods

fmap :: (a -> b) -> Reason a -> Reason b #

(<$) :: a -> Reason b -> Reason a #

Applicative Reason Source # 

Methods

pure :: a -> Reason a #

(<*>) :: Reason (a -> b) -> Reason a -> Reason b #

liftA2 :: (a -> b -> c) -> Reason a -> Reason b -> Reason c #

(*>) :: Reason a -> Reason b -> Reason b #

(<*) :: Reason a -> Reason b -> Reason a #

Foldable Reason Source # 

Methods

fold :: Monoid m => Reason m -> m #

foldMap :: Monoid m => (a -> m) -> Reason a -> m #

foldr :: (a -> b -> b) -> b -> Reason a -> b #

foldr' :: (a -> b -> b) -> b -> Reason a -> b #

foldl :: (b -> a -> b) -> b -> Reason a -> b #

foldl' :: (b -> a -> b) -> b -> Reason a -> b #

foldr1 :: (a -> a -> a) -> Reason a -> a #

foldl1 :: (a -> a -> a) -> Reason a -> a #

toList :: Reason a -> [a] #

null :: Reason a -> Bool #

length :: Reason a -> Int #

elem :: Eq a => a -> Reason a -> Bool #

maximum :: Ord a => Reason a -> a #

minimum :: Ord a => Reason a -> a #

sum :: Num a => Reason a -> a #

product :: Num a => Reason a -> a #

Traversable Reason Source # 

Methods

traverse :: Applicative f => (a -> f b) -> Reason a -> f (Reason b) #

sequenceA :: Applicative f => Reason (f a) -> f (Reason a) #

mapM :: Monad m => (a -> m b) -> Reason a -> m (Reason b) #

sequence :: Monad m => Reason (m a) -> m (Reason a) #

Eq a => Eq (Reason a) Source # 

Methods

(==) :: Reason a -> Reason a -> Bool #

(/=) :: Reason a -> Reason a -> Bool #

Show a => Show (Reason a) Source # 

Methods

showsPrec :: Int -> Reason a -> ShowS #

show :: Reason a -> String #

showList :: [Reason a] -> ShowS #

Generic (Reason a) Source # 

Associated Types

type Rep (Reason a) :: * -> * #

Methods

from :: Reason a -> Rep (Reason a) x #

to :: Rep (Reason a) x -> Reason a #

ToJSON e => ToJSON (Reason e) Source # 
FromJSON e => FromJSON (Reason e) Source # 
XmlPickler e => XmlPickler (Reason e) Source # 

Methods

xpickle :: PU (Reason e) #

JSONSchema e => JSONSchema (Reason e) Source # 

Methods

schema :: Proxy * (Reason e) -> Schema #

ToResponseCode a => ToResponseCode (Reason a) Source # 
type Rep (Reason a) Source # 
type Rep (Reason a) = D1 * (MetaData "Reason" "Rest.Types.Error" "rest-types-1.14.1.2-JLHHv4Ig7oS8l9MMERSVDl" False) ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "UnsupportedRoute" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "UnsupportedMethod" PrefixI False) (U1 *)) (C1 * (MetaCons "UnsupportedVersion" PrefixI False) (U1 *)))) ((:+:) * ((:+:) * (C1 * (MetaCons "IdentError" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * DataError))) (C1 * (MetaCons "HeaderError" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * DataError)))) ((:+:) * (C1 * (MetaCons "ParamError" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * DataError))) (C1 * (MetaCons "InputError" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * DataError)))))) ((:+:) * ((:+:) * (C1 * (MetaCons "OutputError" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * DataError))) ((:+:) * (C1 * (MetaCons "NotFound" PrefixI False) (U1 *)) (C1 * (MetaCons "NotAllowed" PrefixI False) (U1 *)))) ((:+:) * ((:+:) * (C1 * (MetaCons "AuthenticationFailed" PrefixI False) (U1 *)) (C1 * (MetaCons "Busy" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "Gone" PrefixI False) (U1 *)) (C1 * (MetaCons "CustomReason" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (DomainReason a))))))))

class ToResponseCode a where Source #

The response code that should be given for a type. This is currently only used for errors.

Minimal complete definition

toResponseCode

Methods

toResponseCode :: a -> Int Source #