Safe Haskell | None |
---|---|
Language | Haskell2010 |
Colonnade.Types
- 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 #
Constructors
Encoding | |
Fields
|
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.
Constructors
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.
Constructors
OneEncoding | |
Fields
|
Instances
Contravariant (OneEncoding f content) Source # | |
Isomorphic to Identity
Isomorphic to Proxy
Constructors
Headless |
Constructors
Indexed | |
Fields
|
data HeadingErrors content Source #
Constructors
HeadingErrors | |
Fields
|
data DecodingCellError f content Source #
Constructors
DecodingCellError | |
Fields
|
data DecodingRowError f content Source #
Constructors
DecodingRowError | |
Fields
|
newtype DecodingCellErrors f content Source #
Constructors
DecodingCellErrors | |
Fields
|
data RowError f content Source #
Constructors
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 |