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 rowId columnId cell. Hashable rowId => Hashable columnId => Table rowId columnId cell -> Either (HashSet (MissingCell rowId columnId)) Unit

#mk Source

mk :: forall cell rowId columnId. Hashable rowId => Hashable columnId => HashMap (Tuple rowId columnId) cell -> Either (HashSet (MissingCell rowId columnId)) (Table rowId columnId cell)

#vectors Source

vectors :: forall id cell rowId columnId. Hashable id => Hashable rowId => Hashable columnId => Hashable cell => (Tuple rowId columnId -> id) -> Table rowId columnId cell -> HashSet (HashMap (Tuple rowId columnId) cell)

#vectors' Source

vectors' :: forall id idr cell rowId columnId. Hashable id => Hashable idr => (Tuple rowId columnId -> id) -> (Tuple rowId columnId -> idr) -> Table rowId columnId cell -> HashMap id (HashMap idr cell)

#vector Source

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

#mapVectors Source

mapVectors :: forall rowId columnId cell1 cell2 id idr. Hashable id => Hashable rowId => Hashable columnId => Hashable cell1 => Hashable idr => (Tuple rowId columnId -> id) -> (Tuple rowId columnId -> idr) -> (id -> idr -> Tuple rowId columnId) -> (HashMap idr cell1 -> HashMap idr cell2) -> Table rowId columnId cell1 -> Either (HashSet (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