Safe Haskell | None |
---|---|
Language | Haskell98 |
Combinators for specifying the input/output dictionaries of a
Handler
. The combinators can be combined using (
.
)
.
- someI :: Dict h p () o e -> Dict h p i o e
- stringI :: Dict h p i o e -> Dict h p String o e
- xmlTextI :: Dict h p i o e -> Dict h p Text o e
- fileI :: Dict h p i o e -> Dict h p ByteString o e
- readI :: (Info i, Read i, Show i) => Dict h p i o e -> Dict h p i o e
- xmlI :: (Typeable i, XmlPickler i) => Dict h p i o e -> Dict h p i o e
- rawXmlI :: Dict h p i o e -> Dict h p ByteString o e
- jsonI :: (Typeable i, FromJSON i, JSONSchema i) => Dict h p i o e -> Dict h p i o e
- someO :: Dict h p i () e -> Dict h p i o e
- stringO :: Dict h p i () e -> Dict h p i String e
- fileO :: Dict h p i o e -> Dict h p i (ByteString, String) e
- xmlO :: (Typeable o, XmlPickler o) => Dict h p i o e -> Dict h p i o e
- rawXmlO :: Dict h p i () e -> Dict h p i ByteString e
- jsonO :: (Typeable o, ToJSON o, JSONSchema o) => Dict h p i o e -> Dict h p i o e
- multipartO :: Dict h p i () e -> Dict h p i [BodyPart] e
- someE :: (Typeable e, ToJSON e, JSONSchema e) => Dict h p i o () -> Dict h p i o e
- jsonE :: (ToResponseCode e, Typeable e, ToJSON e, JSONSchema e) => Dict h p i o e -> Dict h p i o e
- xmlE :: (ToResponseCode e, Typeable e, XmlPickler e) => Dict h p i o e -> Dict h p i o e
- xmlJsonI :: (Typeable i, FromJSON i, JSONSchema i, XmlPickler i) => Dict h p () o e -> Dict h p i o e
- xmlJsonO :: (Typeable o, ToJSON o, JSONSchema o, XmlPickler o) => Dict h p i () e -> Dict h p i o e
- xmlJsonE :: (ToResponseCode e, Typeable e, ToJSON e, JSONSchema e, XmlPickler e) => Dict h p i o () -> Dict h p i o e
- xmlJson :: (Typeable i, FromJSON i, JSONSchema i, XmlPickler i, Typeable o, ToJSON o, JSONSchema o, XmlPickler o) => Dict h p () () e -> Dict h p i o e
- mkHeader :: Header h -> Dict x p i o e -> Dict h p i o e
- addHeader :: Header h -> Dict h' p i o e -> Dict (h, h') p i o e
- mkPar :: Param p -> Dict h x i o e -> Dict h p i o e
- addPar :: Param p -> Dict h p' i o e -> Dict h (p, p') i o e
Input dictionaries
someI :: Dict h p () o e -> Dict h p i o e Source
Open up input type for extension with custom dictionaries.
xmlTextI :: Dict h p i o e -> Dict h p Text o e Source
Allow direct usage of as input as raw Xml Text
.
fileI :: Dict h p i o e -> Dict h p ByteString o e Source
Allow usage of input as file contents, represented as a ByteString
.
xmlI :: (Typeable i, XmlPickler i) => Dict h p i o e -> Dict h p i o e Source
The input can be read into some instance of XmlPickler
.
rawXmlI :: Dict h p i o e -> Dict h p ByteString o e Source
The input can be used as an XML ByteString
.
jsonI :: (Typeable i, FromJSON i, JSONSchema i) => Dict h p i o e -> Dict h p i o e Source
The input can be read into some instance of Json
.
Output dictionaries
someO :: Dict h p i () e -> Dict h p i o e Source
Open up output type for extension with custom dictionaries.
fileO :: Dict h p i o e -> Dict h p i (ByteString, String) e Source
Allow file output using a combination of the raw data and a mime type.
xmlO :: (Typeable o, XmlPickler o) => Dict h p i o e -> Dict h p i o e Source
Allow output as XML using the XmlPickler
type class.
rawXmlO :: Dict h p i () e -> Dict h p i ByteString e Source
Allow output as raw XML represented as a ByteString
.
jsonO :: (Typeable o, ToJSON o, JSONSchema o) => Dict h p i o e -> Dict h p i o e Source
Allow output as JSON using the Json
type class.
multipartO :: Dict h p i () e -> Dict h p i [BodyPart] e Source
Allow output as multipart. Writes out the ByteStrings separated by boundaries, with content type 'multipart/mixed'.
Error dictionaries
someE :: (Typeable e, ToJSON e, JSONSchema e) => Dict h p i o () -> Dict h p i o e Source
Open up error type for extension with custom dictionaries.
jsonE :: (ToResponseCode e, Typeable e, ToJSON e, JSONSchema e) => Dict h p i o e -> Dict h p i o e Source
Allow error output as JSON using the Json
type class.
xmlE :: (ToResponseCode e, Typeable e, XmlPickler e) => Dict h p i o e -> Dict h p i o e Source
Allow error output as XML using the XmlPickler
type class.
Composed dictionaries
xmlJsonI :: (Typeable i, FromJSON i, JSONSchema i, XmlPickler i) => Dict h p () o e -> Dict h p i o e Source
The input can be read into some instance of both Json
and XmlPickler
.
xmlJsonO :: (Typeable o, ToJSON o, JSONSchema o, XmlPickler o) => Dict h p i () e -> Dict h p i o e Source
Allow output as JSON using the Json
type class and allow output as XML
using the XmlPickler
type class.
xmlJsonE :: (ToResponseCode e, Typeable e, ToJSON e, JSONSchema e, XmlPickler e) => Dict h p i o () -> Dict h p i o e Source
Allow error output as JSON using the Json
type class and allow output as
XML using the XmlPickler
type class.
xmlJson :: (Typeable i, FromJSON i, JSONSchema i, XmlPickler i, Typeable o, ToJSON o, JSONSchema o, XmlPickler o) => Dict h p () () e -> Dict h p i o e Source
The input can be read into some instance of both Json
and XmlPickler
and allow output as JSON using the Json
type class and allow output as XML
using the XmlPickler
type class.
Header dictionaries
mkHeader :: Header h -> Dict x p i o e -> Dict h p i o e Source
Set custom sub-dictionary for recognizing headers.
addHeader :: Header h -> Dict h' p i o e -> Dict (h, h') p i o e Source
Add custom sub-dictionary for recognizing headers.