| 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
| |
Instances
| Eq content => Eq (HeadingErrors content) Source | |
| Read content => Read (HeadingErrors content) Source | |
| Show content => Show (HeadingErrors content) Source | |
| (Show content, Typeable * content) => Exception (HeadingErrors content) Source | |
| Monoid (HeadingErrors content) Source |
data DecodingCellError f content Source
Constructors
| DecodingCellError | |
Fields
| |
Instances
| (Eq content, Eq (f content)) => Eq (DecodingCellError f content) Source | |
| (Read content, Read (f content)) => Read (DecodingCellError f content) Source | |
| (Show content, Show (f content)) => Show (DecodingCellError f content) Source |
data DecodingRowError f content Source
Constructors
| DecodingRowError | |
Fields
| |
Instances
| (Eq content, Eq (f content)) => Eq (DecodingRowError f content) Source | |
| (Read content, Read (f content)) => Read (DecodingRowError f content) Source | |
| (Show content, Show (f content)) => Show (DecodingRowError f content) Source |
newtype DecodingCellErrors f content Source
Constructors
| DecodingCellErrors | |
Fields
| |
Instances
| (Eq content, Eq (f content)) => Eq (DecodingCellErrors f content) Source | |
| (Read content, Read (f content)) => Read (DecodingCellErrors f content) Source | |
| (Show content, Show (f content)) => Show (DecodingCellErrors f content) Source | |
| Monoid (DecodingCellErrors f content) Source |
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 |