gridtables-0.1.1.0: Parser for reStructuredText-style grid tables.

Copyright | © 2022-2023 Posit Software PBC
License | MIT
Maintainer | Albert Krewinkel <albert@zeitkraut.de>
Safe Haskell | None
Language | Haskell2010

Text.GridTable

Contents

- Parse from character stream
- List-based representation

Description

Parse reStructuredText-style grid tables.

Synopsis

- module Text.GridTable.ArrayTable
- gridTable :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m (ArrayTable [Text])
- data Cell a = Cell {
  - cellContent :: a
  - cellRowSpan :: RowSpan
  - cellColSpan :: ColSpan
  }
- rows :: ArrayTable a -> [[Cell a]]

# Documentation

module Text.GridTable.ArrayTable

# Parse from character stream

gridTable :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m (ArrayTable [Text]) Source #

Parses a grid table.

# List-based representation

data Cell a Source #

Raw grid table cell

Constructors

Cell |

Fields

- cellContent :: a
- cellRowSpan :: RowSpan
- cellColSpan :: ColSpan

#### Instances

Instances details

Show a => Show (Cell a) Source # |
Instance details Defined in Text.GridTable Methods showsPrec :: Int -> Cell a -> ShowS Source # show :: Cell a -> String Source # showList :: [Cell a] -> ShowS Source #
Eq a => Eq (Cell a) Source # |
Instance details Defined in Text.GridTable Methods (==) :: Cell a -> Cell a -> Bool Source # (/=) :: Cell a -> Cell a -> Bool Source #
Ord a => Ord (Cell a) Source # |
Instance details Defined in Text.GridTable Methods compare :: Cell a -> Cell a -> Ordering Source # (<) :: Cell a -> Cell a -> Bool Source # (<=) :: Cell a -> Cell a -> Bool Source # (>) :: Cell a -> Cell a -> Bool Source # (>=) :: Cell a -> Cell a -> Bool Source # max :: Cell a -> Cell a -> Cell a Source # min :: Cell a -> Cell a -> Cell a Source #

rows :: ArrayTable a -> [[Cell a]] Source #

Returns the rows of a grid table as lists of simple cells.