Module

Data.Table

Package
purescript-tables
Repository
colehaus/purescript-tables

#cell Source

cell :: forall cell columnId rowId. Ord columnId => Ord rowId => Table rowId columnId cell -> rowId -> columnId -> Maybe cell

#column Source

column :: forall cell columnId rowId. Eq columnId => Table rowId columnId cell -> columnId -> List cell

#columnIds Source

columnIds :: forall columnId rowId cell. Ord columnId => Table rowId columnId cell -> Set columnId

#columns Source

columns :: forall c idc idr. Ord idc => Table idr idc c -> List (NonEmptyList (Tuple (Tuple idr idc) c))

#columns' Source

columns' :: forall c idc idr. Ord idc => Table idr idc c -> List (Tuple idc (NonEmptyList (Tuple idr c)))

#mapColumns Source

mapColumns :: forall rowId columnId cell1 cell2. Ord columnId => Ord rowId => (NonEmptyList cell1 -> NonEmptyList cell2) -> Table rowId columnId cell1 -> Either (Set (MissingCell rowId columnId)) (Table rowId columnId cell2)

The mapping function should preserve the length of the list. If it doesn't, you'll end up with a Left.

#mapRows Source

mapRows :: forall rowId columnId cell1 cell2. Ord columnId => Ord rowId => (NonEmptyList cell1 -> NonEmptyList cell2) -> Table rowId columnId cell1 -> Either (Set (MissingCell rowId columnId)) (Table rowId columnId cell2)

The mapping function should preserve the length of the list. If it doesn't, you'll end up with a Left.

#row Source

row :: forall cell columnId rowId. Eq rowId => Table rowId columnId cell -> rowId -> List cell

#rowIds Source

rowIds :: forall columnId rowId cell. Ord rowId => Table rowId columnId cell -> Set rowId

#rows Source

rows :: forall c idc idr. Ord idr => Table idr idc c -> List (NonEmptyList (Tuple (Tuple idr idc) c))

#rows' Source

rows' :: forall c idc idr. Ord idr => Table idr idc c -> List (Tuple idr (NonEmptyList (Tuple idc c)))

Re-exports from Data.Table.Internal

#Table Source

newtype Table rowId columnId cell

Instances

#MissingCell Source

newtype MissingCell rowId columnId

Instances

#mk Source

mk :: forall columnId rowId cell. Ord rowId => Ord columnId => Map (Tuple rowId columnId) cell -> Either (Set (MissingCell rowId columnId)) (Table rowId columnId cell)