foundation-0.0.29: Alternative prelude with batteries and no dependencies
License BSD-style
Maintainer Foundation
Stability experimental
Portability portable
Safe Haskell None
Language Haskell2010

Foundation.Format.CSV

Description

Provies the support for Comma Separated Value

Synopsis

CSV

data CSV Source #

CSV Type

Instances

Instances details
IsList CSV Source #
Instance details

Defined in Foundation.Format.CSV.Types

Associated Types

type Item CSV Source #

Eq CSV Source #
Instance details

Defined in Foundation.Format.CSV.Types

Show CSV Source #
Instance details

Defined in Foundation.Format.CSV.Types

Semigroup CSV Source #
Instance details

Defined in Foundation.Format.CSV.Types

Monoid CSV Source #
Instance details

Defined in Foundation.Format.CSV.Types

NormalForm CSV Source #
Instance details

Defined in Foundation.Format.CSV.Types

Collection CSV Source #
Instance details

Defined in Foundation.Format.CSV.Types

IndexedCollection CSV Source #
Instance details

Defined in Foundation.Format.CSV.Types

Sequential CSV Source #
Instance details

Defined in Foundation.Format.CSV.Types

Methods

take :: CountOf ( Element CSV ) -> CSV -> CSV Source #

revTake :: CountOf ( Element CSV ) -> CSV -> CSV Source #

drop :: CountOf ( Element CSV ) -> CSV -> CSV Source #

revDrop :: CountOf ( Element CSV ) -> CSV -> CSV Source #

splitAt :: CountOf ( Element CSV ) -> CSV -> ( CSV , CSV ) Source #

revSplitAt :: CountOf ( Element CSV ) -> CSV -> ( CSV , CSV ) Source #

splitOn :: ( Element CSV -> Bool ) -> CSV -> [ CSV ] Source #

break :: ( Element CSV -> Bool ) -> CSV -> ( CSV , CSV ) Source #

breakEnd :: ( Element CSV -> Bool ) -> CSV -> ( CSV , CSV ) Source #

breakElem :: Element CSV -> CSV -> ( CSV , CSV ) Source #

takeWhile :: ( Element CSV -> Bool ) -> CSV -> CSV Source #

dropWhile :: ( Element CSV -> Bool ) -> CSV -> CSV Source #

intersperse :: Element CSV -> CSV -> CSV Source #

intercalate :: Element CSV -> CSV -> Element CSV Source #

span :: ( Element CSV -> Bool ) -> CSV -> ( CSV , CSV ) Source #

spanEnd :: ( Element CSV -> Bool ) -> CSV -> ( CSV , CSV ) Source #

filter :: ( Element CSV -> Bool ) -> CSV -> CSV Source #

partition :: ( Element CSV -> Bool ) -> CSV -> ( CSV , CSV ) Source #

reverse :: CSV -> CSV Source #

uncons :: CSV -> Maybe ( Element CSV , CSV ) Source #

unsnoc :: CSV -> Maybe ( CSV , Element CSV ) Source #

snoc :: CSV -> Element CSV -> CSV Source #

cons :: Element CSV -> CSV -> CSV Source #

find :: ( Element CSV -> Bool ) -> CSV -> Maybe ( Element CSV ) Source #

sortBy :: ( Element CSV -> Element CSV -> Ordering ) -> CSV -> CSV Source #

singleton :: Element CSV -> CSV Source #

head :: NonEmpty CSV -> Element CSV Source #

last :: NonEmpty CSV -> Element CSV Source #

tail :: NonEmpty CSV -> CSV Source #

init :: NonEmpty CSV -> CSV Source #

replicate :: CountOf ( Element CSV ) -> Element CSV -> CSV Source #

isPrefixOf :: CSV -> CSV -> Bool Source #

isSuffixOf :: CSV -> CSV -> Bool Source #

isInfixOf :: CSV -> CSV -> Bool Source #

stripPrefix :: CSV -> CSV -> Maybe CSV Source #

stripSuffix :: CSV -> CSV -> Maybe CSV Source #

type Item CSV Source #
Instance details

Defined in Foundation.Format.CSV.Types

type Element CSV Source #
Instance details

Defined in Foundation.Format.CSV.Types

Builder

String Bulider

csvStringBuilder :: CSV -> Builder Source #

serialise the CSV document into a UTF8 string

Block Builder

csvBlockBuilder :: CSV -> Builder Source #

serialise the CSV document into a UTF8 encoded (Block Word8)

Conduit

Parser

String Bulider

Conduit

Row

data Row Source #

CSV Row

Instances

Instances details
IsList Row Source #
Instance details

Defined in Foundation.Format.CSV.Types

Associated Types

type Item Row Source #

Eq Row Source #
Instance details

Defined in Foundation.Format.CSV.Types

Show Row Source #
Instance details

Defined in Foundation.Format.CSV.Types

Semigroup Row Source #
Instance details

Defined in Foundation.Format.CSV.Types

Monoid Row Source #
Instance details

Defined in Foundation.Format.CSV.Types

NormalForm Row Source #
Instance details

Defined in Foundation.Format.CSV.Types

Collection Row Source #
Instance details

Defined in Foundation.Format.CSV.Types

IndexedCollection Row Source #
Instance details

Defined in Foundation.Format.CSV.Types

Sequential Row Source #
Instance details

Defined in Foundation.Format.CSV.Types

Methods

take :: CountOf ( Element Row ) -> Row -> Row Source #

revTake :: CountOf ( Element Row ) -> Row -> Row Source #

drop :: CountOf ( Element Row ) -> Row -> Row Source #

revDrop :: CountOf ( Element Row ) -> Row -> Row Source #

splitAt :: CountOf ( Element Row ) -> Row -> ( Row , Row ) Source #

revSplitAt :: CountOf ( Element Row ) -> Row -> ( Row , Row ) Source #

splitOn :: ( Element Row -> Bool ) -> Row -> [ Row ] Source #

break :: ( Element Row -> Bool ) -> Row -> ( Row , Row ) Source #

breakEnd :: ( Element Row -> Bool ) -> Row -> ( Row , Row ) Source #

breakElem :: Element Row -> Row -> ( Row , Row ) Source #

takeWhile :: ( Element Row -> Bool ) -> Row -> Row Source #

dropWhile :: ( Element Row -> Bool ) -> Row -> Row Source #

intersperse :: Element Row -> Row -> Row Source #

intercalate :: Element Row -> Row -> Element Row Source #

span :: ( Element Row -> Bool ) -> Row -> ( Row , Row ) Source #

spanEnd :: ( Element Row -> Bool ) -> Row -> ( Row , Row ) Source #

filter :: ( Element Row -> Bool ) -> Row -> Row Source #

partition :: ( Element Row -> Bool ) -> Row -> ( Row , Row ) Source #

reverse :: Row -> Row Source #

uncons :: Row -> Maybe ( Element Row , Row ) Source #

unsnoc :: Row -> Maybe ( Row , Element Row ) Source #

snoc :: Row -> Element Row -> Row Source #

cons :: Element Row -> Row -> Row Source #

find :: ( Element Row -> Bool ) -> Row -> Maybe ( Element Row ) Source #

sortBy :: ( Element Row -> Element Row -> Ordering ) -> Row -> Row Source #

singleton :: Element Row -> Row Source #

head :: NonEmpty Row -> Element Row Source #

last :: NonEmpty Row -> Element Row Source #

tail :: NonEmpty Row -> Row Source #

init :: NonEmpty Row -> Row Source #

replicate :: CountOf ( Element Row ) -> Element Row -> Row Source #

isPrefixOf :: Row -> Row -> Bool Source #

isSuffixOf :: Row -> Row -> Bool Source #

isInfixOf :: Row -> Row -> Bool Source #

stripPrefix :: Row -> Row -> Maybe Row Source #

stripSuffix :: Row -> Row -> Maybe Row Source #

Record Row Source #
Instance details

Defined in Foundation.Format.CSV.Types

type Item Row Source #
Instance details

Defined in Foundation.Format.CSV.Types

type Element Row Source #
Instance details

Defined in Foundation.Format.CSV.Types

Field

data Escaping Source #

Instances

Instances details
Bounded Escaping Source #
Instance details

Defined in Foundation.Format.CSV.Types

Enum Escaping Source #
Instance details

Defined in Foundation.Format.CSV.Types

Eq Escaping Source #
Instance details

Defined in Foundation.Format.CSV.Types

Ord Escaping Source #
Instance details

Defined in Foundation.Format.CSV.Types

Show Escaping Source #
Instance details

Defined in Foundation.Format.CSV.Types

NormalForm Escaping Source #
Instance details

Defined in Foundation.Format.CSV.Types

class IsField a where Source #

Instances

Instances details
IsField Bool Source #
Instance details

Defined in Foundation.Format.CSV.Types

IsField Char Source #
Instance details

Defined in Foundation.Format.CSV.Types

IsField Double Source #
Instance details

Defined in Foundation.Format.CSV.Types

IsField Int Source #
Instance details

Defined in Foundation.Format.CSV.Types

IsField Int8 Source #
Instance details

Defined in Foundation.Format.CSV.Types

IsField Int16 Source #
Instance details

Defined in Foundation.Format.CSV.Types

IsField Int32 Source #
Instance details

Defined in Foundation.Format.CSV.Types

IsField Int64 Source #
Instance details

Defined in Foundation.Format.CSV.Types

IsField Integer Source #
Instance details

Defined in Foundation.Format.CSV.Types

IsField Natural Source #
Instance details

Defined in Foundation.Format.CSV.Types

IsField Word Source #
Instance details

Defined in Foundation.Format.CSV.Types

IsField Word8 Source #
Instance details

Defined in Foundation.Format.CSV.Types

IsField Word16 Source #
Instance details

Defined in Foundation.Format.CSV.Types

IsField Word32 Source #
Instance details

Defined in Foundation.Format.CSV.Types

IsField Word64 Source #
Instance details

Defined in Foundation.Format.CSV.Types

IsField String Source #
Instance details

Defined in Foundation.Format.CSV.Types

IsField Word256 Source #
Instance details

Defined in Foundation.Format.CSV.Types

IsField Word128 Source #
Instance details

Defined in Foundation.Format.CSV.Types

IsField Field Source #
Instance details

Defined in Foundation.Format.CSV.Types

IsField [ Char ] Source #
Instance details

Defined in Foundation.Format.CSV.Types

IsField a => IsField ( Maybe a) Source #
Instance details

Defined in Foundation.Format.CSV.Types

IsField ( Offset a) Source #
Instance details

Defined in Foundation.Format.CSV.Types

IsField ( CountOf a) Source #
Instance details

Defined in Foundation.Format.CSV.Types

helpers

string :: String -> Field Source #

heler function to create a FieldString.

This function will findout automatically if an escaping is needed. if you wish to perform the escaping manually, do not used this function