Safe Haskell | None |
---|---|
Language | Haskell2010 |
Network.API.Builder.Receive
Documentation
class Receivable r where Source
Methods
receive :: ErrorReceivable e => Response ByteString -> Either (APIError e) r Source
Instances
Receivable ByteString | |
Receivable Value | |
Receivable Questions | |
Receivable (Response ByteString) | |
FromJSON a => Receivable (JSONResponse a) | |
(Receivable a, Receivable b) => Receivable (a, b) | |
(Receivable a, Receivable b, Receivable c) => Receivable (a, b, c) | |
(Receivable a, Receivable b, Receivable c, Receivable d) => Receivable (a, b, c, d) | |
(Receivable a, Receivable b, Receivable c, Receivable d, Receivable e) => Receivable (a, b, c, d, e) |
useFromJSON :: (FromJSON a, ErrorReceivable e) => Response ByteString -> Either (APIError e) a Source
class ErrorReceivable e where Source
Methods
receiveError :: Response ByteString -> Maybe e Source
Instances
useErrorFromJSON :: FromJSON a => Response ByteString -> Maybe a Source
newtype JSONResponse a Source
Constructors
JSONResponse | |
Fields
|
Instances
Eq a => Eq (JSONResponse a) | |
Ord a => Ord (JSONResponse a) | |
Read a => Read (JSONResponse a) | |
Show a => Show (JSONResponse a) | |
FromJSON a => FromJSON (JSONResponse a) | |
FromJSON a => Receivable (JSONResponse a) |