| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Servant.CSV.Cassava
Description
A CSV empty datatype with MimeRender and MimeUnrender instances for
cassava's encoding and decoding classes.
>>>type Eg = Get '[(CSV', MyEncodeOptions)] [(Int, String)]
Default encoding and decoding options are also provided, along with the
CSV type synonym that uses them.
>>>type EgDefault = Get '[CSV] [(Int, String)]
- data CSV'
- type CSV = (CSV', DefaultDecodeOpts)
- class EncodeOpts a where
- encodeOpts :: Proxy a -> EncodeOptions
- data DefaultEncodeOpts
- class DecodeOpts a where
- decodeOpts :: Proxy a -> DecodeOptions
- data DefaultDecodeOpts
Documentation
Instances
| Generic CSV' Source | |
| Accept * (CSV', a) Source | text/csv;charset=utf-8 |
| (DefaultOrdered a, ToNamedRecord a, EncodeOpts opt) => MimeRender * (CSV', opt) (Vector a) Source | Encode with |
| (DefaultOrdered a, ToNamedRecord a, EncodeOpts opt) => MimeRender * (CSV', opt) [a] Source | Encode with |
| (FromRecord a, DecodeOpts opt) => MimeUnrender * (CSV', opt) (Vector a) Source | Decode with |
| (FromRecord a, DecodeOpts opt) => MimeUnrender * (CSV', opt) [a] Source | Decode with |
| (ToNamedRecord a, EncodeOpts opt) => MimeRender * (CSV', opt) (Header, Vector a) Source | Encode with |
| (ToNamedRecord a, EncodeOpts opt) => MimeRender * (CSV', opt) (Header, [a]) Source | Encode with |
| (FromNamedRecord a, DecodeOpts opt) => MimeUnrender * (CSV', opt) (Header, Vector a) Source | |
| (FromNamedRecord a, DecodeOpts opt) => MimeUnrender * (CSV', opt) (Header, [a]) Source | Decode with |
| type Rep CSV' Source |
type CSV = (CSV', DefaultDecodeOpts) Source
Encoding
Instances
Encode Options
data DefaultEncodeOpts Source
Decoding
Instances
Decode Options
data DefaultDecodeOpts Source