Safe Haskell | None |
---|---|
Language | Haskell2010 |
- newtype Encoding f content a = Encoding {
- getEncoding :: Vector (OneEncoding f content a)
- data Decoding f content a where
- DecodingPure :: !a -> Decoding f content a
- DecodingAp :: !(f content) -> !(content -> Either String a) -> !(Decoding f content (a -> b)) -> Decoding f content b
- data OneEncoding f content a = OneEncoding {
- oneEncodingHead :: !(f content)
- oneEncodingEncode :: !(a -> content)
- newtype Headed a = Headed {
- getHeaded :: a
- data Headless a = Headless
- data Indexed f a = Indexed {
- indexedIndex :: !Int
- indexedHeading :: !(f a)
- data HeadingErrors content = HeadingErrors {
- headingErrorsMissing :: Vector content
- headingErrorsDuplicate :: Vector (content, Int)
- data DecodingCellError f content = DecodingCellError {
- decodingCellErrorContent :: !content
- decodingCellErrorHeader :: !(Indexed f content)
- decodingCellErrorMessage :: !String
- data DecodingRowError f content = DecodingRowError {
- decodingRowErrorRow :: !Int
- decodingRowErrorError :: !(RowError f content)
- newtype DecodingCellErrors f content = DecodingCellErrors {
- getDecodingCellErrors :: Vector (DecodingCellError f content)
- data RowError f content
- = RowErrorParse !String
- | RowErrorDecode !(DecodingCellErrors f content)
- | RowErrorSize !Int !Int
- | RowErrorHeading !(HeadingErrors content)
- | RowErrorMinSize !Int !Int
- | RowErrorMalformed !String
Documentation
newtype Encoding f content a Source #
Encoding | |
|
data Decoding f content a where Source #
This just actually a specialization of the free applicative.
Check out Control.Applicative.Free
in the free
library to
learn more about this. The meanings of the fields are documented
slightly more in the source code. Unfortunately, haddock does not
play nicely with GADTs.
DecodingPure :: !a -> Decoding f content a | |
DecodingAp :: !(f content) -> !(content -> Either String a) -> !(Decoding f content (a -> b)) -> Decoding f content b |
data OneEncoding f content a Source #
Encodes a header and a cell.
OneEncoding | |
|
Contravariant (OneEncoding f content) Source # | |
Isomorphic to Identity
Isomorphic to Proxy
Indexed | |
|
data HeadingErrors content Source #
HeadingErrors | |
|
data DecodingCellError f content Source #
DecodingCellError | |
|
data DecodingRowError f content Source #
DecodingRowError | |
|
newtype DecodingCellErrors f content Source #
DecodingCellErrors | |
|
data RowError f content Source #
RowErrorParse !String | Error occurred parsing the document into cells |
RowErrorDecode !(DecodingCellErrors f content) | Error decoding the content |
RowErrorSize !Int !Int | Wrong number of cells in the row |
RowErrorHeading !(HeadingErrors content) | |
RowErrorMinSize !Int !Int | |
RowErrorMalformed !String | Error decoding unicode content |