PrimitiveArray-0.5.2.0: Efficient multidimensional arrays

Safe HaskellNone

Data.PrimitiveArray.FillTables

Contents

Description

Operations to fill primitive arrays. Arrays are combined just like indices using Z and '(:.)'. This allows filling an unlimited number of tables.

TODO make explicit in which order the tables are filled.

Synopsis

Driver classes for table filling system.

class UpperTriS m stack whereSource

Methods

upperTriS :: stack -> m ()Source

Instances

(Monad m, MPrimArrayOps arr (:. Z Subword) e, Stack m Subword (:. xs (SubwordNonTerminal m arr e))) => UpperTriS m (:. xs (SubwordNonTerminal m arr e)) 

class Stack m sh xs whereSource

Defines how a single index in a stack of arrays + evaluation functions is handled. The instances *should* work for any index ix.

Methods

writeStack :: xs -> sh -> m ()Source

Instances

Monad m => Stack m sh Z 
(PrimMonad m, Stack m ix xs, MPrimArrayOps arr ix e) => Stack m ix (:. xs (GeneralNonTerminal m arr ix e)) 
(PrimMonad m, Stack m Subword xs, MPrimArrayOps arr (:. Z Subword) e) => Stack m Subword (:. xs (SubwordNonTerminal m arr e)) 

Instances

1-tape grammars with Subword indices.

Multi-tape indices.

type SubwordNonTerminal m arr e = (MutArr m (arr (Z :. Subword) e), Subword -> m e)Source

type GeneralNonTerminal m arr ix e = (MutArr m (arr ix e), ix -> m e)Source