Module

Data.Table.Internal

Package
purescript-tables
Repository
colehaus/purescript-tables

#Table Source

newtype Table rowId columnId cell

Constructors

Instances

#MissingCell Source

newtype MissingCell rowId columnId

Constructors

Instances

#valid Source

valid :: forall cell columnId rowId. Ord rowId => Ord columnId => Table rowId columnId cell -> Either (Set (MissingCell rowId columnId)) Unit

#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)

#vectors Source

vectors :: forall columnId rowId c id. Ord id => (Tuple rowId columnId -> id) -> Table rowId columnId c -> List (NonEmptyList (Tuple (Tuple rowId columnId) c))

#vectors' Source

vectors' :: forall columnId rowId c idr id. Ord id => (Tuple rowId columnId -> id) -> (Tuple rowId columnId -> idr) -> Table rowId columnId c -> List (Tuple id (NonEmptyList (Tuple idr c)))

#vector Source

vector :: forall cell columnId rowId id. Eq id => (Tuple rowId columnId -> id) -> Table rowId columnId cell -> id -> List cell

#mapVectors Source

mapVectors :: forall id cell2 cell1 columnId rowId. Ord id => Ord rowId => Ord columnId => (Tuple rowId columnId -> id) -> (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.