wumpus-basic-0.22.0: Basic objects and system code built on Wumpus-Core.

PortabilityGHC
Stabilityhighly unstable
Maintainerstephen.tetley@gmail.com

Wumpus.Basic.Kernel.Drawing.Chain

Description

Chaining moveable LocGraphics.

Synopsis

Documentation

data GenChain st u a Source

Instances

type Chain u a = GenChain () u aSource

data ChainScheme u Source

scheme_start is a function from the origin to state.

For instance, we might want to cache the origin - this would not be possible if start was just a pure cst value.

Constructors

forall cst . ChainScheme 

Fields

chain_init :: Point2 u -> cst
 
chain_step :: Point2 u -> cst -> (Point2 u, cst)
 

runGenChain :: InterpretUnit u => ChainScheme u -> st -> GenChain st u a -> LocImage u (a, st)Source

evalGenChain :: InterpretUnit u => ChainScheme u -> st -> GenChain st u a -> LocImage u aSource

Forget the user state LocImage, just return the answer.

execGenChain :: InterpretUnit u => ChainScheme u -> st -> GenChain st u a -> LocImage u stSource

Forget the answer, just return the user state.

stripGenChain :: InterpretUnit u => ChainScheme u -> st -> GenChain st u a -> LocQuery u (a, st)Source

tableRowwiseScm :: Num u => Int -> (u, u) -> ChainScheme uSource

runTableRowwise :: InterpretUnit u => Int -> (u, u) -> Chain u a -> LocImage u aSource

runTableColumnwise :: InterpretUnit u => Int -> (u, u) -> Chain u a -> LocImage u aSource