gridtables-0.1.0.0: Parser for reStructuredText-style grid tables.
Copyright© 2022 RStudio PBC
LicenseMIT
MaintainerAlbert Krewinkel <albert@zeitkraut.de>
Safe HaskellNone
LanguageHaskell2010

Text.GridTable.ArrayTable

Description

Grid table representation based on arrays.

Synopsis

Documentation

data ArrayTable a #

Table representation based on an array; cells are placed on a grid, with indices spanned by other cells containing placeholder cells that point to the spanning cell.

Instances

Instances details
Show a => Show (ArrayTable a) # 
Instance details

Defined in Text.GridTable.ArrayTable

Eq a => Eq (ArrayTable a) # 
Instance details

Defined in Text.GridTable.ArrayTable

Methods

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

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

data GridCell a #

A grid cell contains either a real table cell, or is the continuation of a column or row-spanning cell. In the latter case, the index of the continued cell is provided.

Instances

Instances details
Show a => Show (GridCell a) # 
Instance details

Defined in Text.GridTable.ArrayTable

Methods

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

show :: GridCell a -> String #

showList :: [GridCell a] -> ShowS #

Eq a => Eq (GridCell a) # 
Instance details

Defined in Text.GridTable.ArrayTable

Methods

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

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

newtype RowSpan #

The number of rows spanned by a cell.

Constructors

RowSpan Int 

Instances

Instances details
Enum RowSpan # 
Instance details

Defined in Text.GridTable.ArrayTable

Num RowSpan # 
Instance details

Defined in Text.GridTable.ArrayTable

Read RowSpan # 
Instance details

Defined in Text.GridTable.ArrayTable

Show RowSpan # 
Instance details

Defined in Text.GridTable.ArrayTable

Eq RowSpan # 
Instance details

Defined in Text.GridTable.ArrayTable

Methods

(==) :: RowSpan -> RowSpan -> Bool #

(/=) :: RowSpan -> RowSpan -> Bool #

Ord RowSpan # 
Instance details

Defined in Text.GridTable.ArrayTable

newtype ColSpan #

The number of columns spanned by a cell.

Constructors

ColSpan Int 

Instances

Instances details
Enum ColSpan # 
Instance details

Defined in Text.GridTable.ArrayTable

Num ColSpan # 
Instance details

Defined in Text.GridTable.ArrayTable

Read ColSpan # 
Instance details

Defined in Text.GridTable.ArrayTable

Show ColSpan # 
Instance details

Defined in Text.GridTable.ArrayTable

Eq ColSpan # 
Instance details

Defined in Text.GridTable.ArrayTable

Methods

(==) :: ColSpan -> ColSpan -> Bool #

(/=) :: ColSpan -> ColSpan -> Bool #

Ord ColSpan # 
Instance details

Defined in Text.GridTable.ArrayTable

type CellIndex = (RowIndex, ColIndex) #

Index to a cell in a table part.

newtype RowIndex #

Row index in a table array.

Constructors

RowIndex 

Fields

Instances

Instances details
Enum RowIndex # 
Instance details

Defined in Text.GridTable.ArrayTable

Ix RowIndex # 
Instance details

Defined in Text.GridTable.ArrayTable

Num RowIndex # 
Instance details

Defined in Text.GridTable.ArrayTable

Show RowIndex # 
Instance details

Defined in Text.GridTable.ArrayTable

Eq RowIndex # 
Instance details

Defined in Text.GridTable.ArrayTable

Ord RowIndex # 
Instance details

Defined in Text.GridTable.ArrayTable

newtype ColIndex #

Column index in a table array.

Constructors

ColIndex 

Fields

Instances

Instances details
Enum ColIndex # 
Instance details

Defined in Text.GridTable.ArrayTable

Ix ColIndex # 
Instance details

Defined in Text.GridTable.ArrayTable

Num ColIndex # 
Instance details

Defined in Text.GridTable.ArrayTable

Show ColIndex # 
Instance details

Defined in Text.GridTable.ArrayTable

Eq ColIndex # 
Instance details

Defined in Text.GridTable.ArrayTable

Ord ColIndex # 
Instance details

Defined in Text.GridTable.ArrayTable

mapCells :: (a -> b) -> ArrayTable a -> ArrayTable b #

Apply a function to all cell contents in a grid table.