Safe Haskell | None |
---|
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.
- class UpperTriS m stack where
- upperTriS :: stack -> m ()
- class Stack m sh xs where
- writeStack :: xs -> sh -> m ()
- type SubwordNonTerminal m arr e = (MutArr m (arr (Z :. Subword) e), Subword -> m e)
- type GeneralNonTerminal m arr ix e = (MutArr m (arr ix e), ix -> m e)
Driver classes for table filling system.
class UpperTriS m stack whereSource
(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
.
writeStack :: xs -> sh -> m ()Source
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 GeneralNonTerminal m arr ix e = (MutArr m (arr ix e), ix -> m e)Source