data-cell 1.0.0.0 → 1.0.0.1
raw patch · 2 files changed
+43/−15 lines, 2 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Data.Cell: Cell :: a -> CellDelimiter -> Cell a
- Data.Cell: EOC :: CellDelimiter
- Data.Cell: EOP :: CellDelimiter
- Data.Cell: EOR :: CellDelimiter
- Data.Cell: EOT :: CellDelimiter
- Data.Cell: instance GHC.Classes.Eq Data.Cell.CellDelimiter
- Data.Cell: instance GHC.Classes.Eq a => GHC.Classes.Eq (Data.Cell.Cell a)
- Data.Cell: instance GHC.Classes.Ord Data.Cell.CellDelimiter
- Data.Cell: instance GHC.Classes.Ord a => GHC.Classes.Ord (Data.Cell.Cell a)
- Data.Cell: instance GHC.Enum.Enum Data.Cell.CellDelimiter
- Data.Cell: instance GHC.Show.Show Data.Cell.CellDelimiter
- Data.Cell: instance GHC.Show.Show a => GHC.Show.Show (Data.Cell.Cell a)
+ Data.Cell: [Cell] :: a -> CellDelimiter -> Cell a
+ Data.Cell: [EOC] :: CellDelimiter
+ Data.Cell: [EOP] :: CellDelimiter
+ Data.Cell: [EOR] :: CellDelimiter
+ Data.Cell: [EOT] :: CellDelimiter
+ Data.Cell: instance Enum CellDelimiter
+ Data.Cell: instance Eq CellDelimiter
+ Data.Cell: instance Eq a => Eq (Cell a)
+ Data.Cell: instance Functor Cell
+ Data.Cell: instance Ord CellDelimiter
+ Data.Cell: instance Ord a => Ord (Cell a)
+ Data.Cell: instance Show CellDelimiter
+ Data.Cell: instance Show a => Show (Cell a)
Files
- data-cell.cabal +16/−3
- src/Data/Cell.lhs +27/−12
data-cell.cabal view
@@ -1,5 +1,5 @@ name: data-cell-version: 1.0.0.0+version: 1.0.0.1 synopsis: Generic cellular data representation library homepage: https://github.com/zadarnowski/data-cell category: Data@@ -14,8 +14,21 @@ This library defines a trivial type used for streaming of tabular data using coinductive control structures- such as pipes, conduit or iteratees.+ such as pipes, conduit or iteratees with a guaranteed+ constant memory usage. + In this structure, each /cell/ of data is annotated+ with information about its relation to the following+ cell in the stream, namely /end of cell/, /end of row/+ and /end of table/ conditions. In addition, in order+ to achieve truly-constant memory usage irrespective of+ individual cell size, we allow individual cells to be+ subdivided further into /parts/, as indicated by the+ /end of part/ condition. Logically, this subdivision+ into parts is supposed to be purely operational and+ have no semantic significance, similarly to subdivision+ of lazy bytestrings into chunks.+ cabal-version: >= 1.18 build-type: Simple license: BSD3@@ -28,7 +41,7 @@ source-repository this type: git location: https://github.com/zadarnowski/data-cell.git- tag: 1.0.0.0+ tag: 1.0.0.1 library hs-source-dirs: src
src/Data/Cell.lhs view
@@ -1,25 +1,40 @@-> -- | Module: Data.Cell-> -- Description: Generic cellular data representation library-> -- Copyright: © 2015 Patryk Zadarnowski <pat@jantar.org>-> -- License: BSD3-> -- Maintainer: pat@jantar.org-> -- Stability: experimental-> -- Portability: portable+> -- | Module: Data.Cell+> -- Description: Generic cellular data representation library+> -- Copyright: © 2015 Patryk Zadarnowski <pat@jantar.org>+> -- License: BSD3+> -- Maintainer: pat@jantar.org+> -- Stability: experimental+> -- Portability: portable+> --+> -- In this structure, each /cell/ of data is annotated+> -- with information about its relation to the following+> -- cell in the stream, namely /end of cell/, /end of row/+> -- and /end of table/ conditions. In addition, in order+> -- to achieve truly-constant memory usage irrespective of+> -- individual cell size, we allow individual cells to be+> -- subdivided further into /parts/, as indicated by the+> -- /end of part/ condition. Logically, this subdivision+> -- into parts is supposed to be purely operational and+> -- have no semantic significance, similarly to subdivision+> -- of lazy bytestrings into chunks. > module Data.Cell ( > Cell (..), CellDelimiter (..) > ) where -> -- | Individual cell type+> -- | Type used to represent individual data cells. > data Cell a = Cell a CellDelimiter > deriving (Eq, Ord, Show) +> instance Functor Cell where+> fmap f (Cell x d) = Cell (f x) d+ > -- | Cell delimiter > data CellDelimiter =-> EOP -- ^ end of partial cell content-> | EOC -- ^ end of cell-> | EOR -- ^ end of row-> | EOT -- ^ end of table+> EOP -- ^ end of a partial cell content+> | EOC -- ^ end of a complete data cell+> | EOR -- ^ end of a complete row of cells+> | EOT -- ^ end of an entire table > deriving (Eq, Ord, Show, Enum)