siphon-0.8.1: Encode and decode CSV files

Safe HaskellNone
LanguageHaskell2010

Siphon.Types

Synopsis

Documentation

data Siphon f c 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

SiphonPure :: !a -> Siphon f c a 
SiphonAp :: !(f c) -> !(c -> Maybe a) -> !(Siphon f c (a -> b)) -> Siphon f c b 

Instances

Functor (Siphon f c) Source # 

Methods

fmap :: (a -> b) -> Siphon f c a -> Siphon f c b #

(<$) :: a -> Siphon f c b -> Siphon f c a #

Applicative (Siphon f c) Source # 

Methods

pure :: a -> Siphon f c a #

(<*>) :: Siphon f c (a -> b) -> Siphon f c a -> Siphon f c b #

liftA2 :: (a -> b -> c) -> Siphon f c a -> Siphon f c b -> Siphon f c c #

(*>) :: Siphon f c a -> Siphon f c b -> Siphon f c b #

(<*) :: Siphon f c a -> Siphon f c b -> Siphon f c a #

newtype Indexed a Source #

Constructors

Indexed 

Fields

Instances

Functor Indexed Source # 

Methods

fmap :: (a -> b) -> Indexed a -> Indexed b #

(<$) :: a -> Indexed b -> Indexed a #

Eq (Indexed a) Source # 

Methods

(==) :: Indexed a -> Indexed a -> Bool #

(/=) :: Indexed a -> Indexed a -> Bool #

Ord (Indexed a) Source # 

Methods

compare :: Indexed a -> Indexed a -> Ordering #

(<) :: Indexed a -> Indexed a -> Bool #

(<=) :: Indexed a -> Indexed a -> Bool #

(>) :: Indexed a -> Indexed a -> Bool #

(>=) :: Indexed a -> Indexed a -> Bool #

max :: Indexed a -> Indexed a -> Indexed a #

min :: Indexed a -> Indexed a -> Indexed a #

Read (Indexed a) Source # 
Show (Indexed a) Source # 

Methods

showsPrec :: Int -> Indexed a -> ShowS #

show :: Indexed a -> String #

showList :: [Indexed a] -> ShowS #

data RowError Source #

Constructors

RowErrorParse

Error occurred parsing the document into cells

RowErrorDecode !(Vector CellError)

Error decoding the content

RowErrorSize !Int !Int

Wrong number of cells in the row

RowErrorHeaders !(Vector (Vector CellError)) !(Vector Text) !(Vector Int)

Three parts: (a) Multiple header cells matched the same expected cell, (b) Headers that were missing, (c) Missing headers that were lambdas. They cannot be shown so instead their positions in the Siphon are given.

RowErrorHeaderSize !Int !Int

Not enough cells in header, expected, actual

RowErrorMalformed !Int

Error decoding unicode content, column number