serv-0.1.0.0: Dependently typed API server framework

Safe HaskellNone
LanguageHaskell2010

Serv.ContentType

Synopsis

Documentation

class HasMediaType ty where Source #

Minimal complete definition

mediaType

Methods

mediaType :: Proxy ty -> MediaType Source #

class HasMediaType ty => MimeEncode ty val where Source #

Minimal complete definition

mimeEncode

Methods

mimeEncode :: Proxy ty -> val -> ByteString Source #

class HasMediaType ty => MimeDecode ty val where Source #

Minimal complete definition

mimeDecode

Instances

(//) :: ByteString -> ByteString -> MediaType #

Builds a MediaType without parameters. Can produce an error if either type is invalid.

(/:) :: MediaType -> (ByteString, ByteString) -> MediaType #

Adds a parameter to a MediaType. Can produce an error if either string is invalid.