siphon-0.8.2.1: Encode and decode CSV files
Safe HaskellSafe-Inferred
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

Instances details
Applicative (Siphon f c) Source # 
Instance details

Defined in Siphon.Types

Methods

pure :: a -> Siphon f c a #

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

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

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

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

Functor (Siphon f c) Source # 
Instance details

Defined in Siphon.Types

Methods

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

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

newtype Indexed a Source #

Constructors

Indexed 

Fields

Instances

Instances details
Eq1 Indexed Source # 
Instance details

Defined in Siphon.Types

Methods

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

Show1 Indexed Source # 
Instance details

Defined in Siphon.Types

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Indexed a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Indexed a] -> ShowS #

Functor Indexed Source # 
Instance details

Defined in Siphon.Types

Methods

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

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

Read (Indexed a) Source # 
Instance details

Defined in Siphon.Types

Show (Indexed a) Source # 
Instance details

Defined in Siphon.Types

Methods

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

show :: Indexed a -> String #

showList :: [Indexed a] -> ShowS #

Eq (Indexed a) Source # 
Instance details

Defined in Siphon.Types

Methods

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

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

Ord (Indexed a) Source # 
Instance details

Defined in Siphon.Types

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 #

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

Instances

Instances details
Read RowError Source # 
Instance details

Defined in Siphon.Types

Show RowError Source # 
Instance details

Defined in Siphon.Types

Eq RowError Source # 
Instance details

Defined in Siphon.Types

data CellError Source #

Constructors

CellError 

Instances

Instances details
Read CellError Source # 
Instance details

Defined in Siphon.Types

Show CellError Source # 
Instance details

Defined in Siphon.Types

Eq CellError Source # 
Instance details

Defined in Siphon.Types