Portability | GHC |
---|---|
Stability | highly unstable |
Maintainer | stephen.tetley@gmail.com |
Writer monad with imperative turtle style movement to build LocGraphics.
- data GenLocTrace st u a
- type LocTrace u a = GenLocTrace () u a
- runGenLocTrace :: InterpretUnit u => st -> GenLocTrace st u a -> LocImage u (a, st)
- evalGenLocTrace :: InterpretUnit u => st -> GenLocTrace st u a -> LocImage u a
- execGenLocTrace :: InterpretUnit u => st -> GenLocTrace st u a -> LocImage u st
- stripGenLocTrace :: InterpretUnit u => st -> GenLocTrace st u a -> LocQuery u (a, st)
- runLocTrace :: InterpretUnit u => LocTrace u a -> LocImage u a
- runLocTrace_ :: InterpretUnit u => LocTrace u a -> LocGraphic u
GenLocTrace monad
data GenLocTrace st u a Source
GenLocTrace is a reader-writer-state monad.
The writer accumulates a graphical trace and the state is the current point.
Monad (GenLocTrace st u) | |
Functor (GenLocTrace st u) | |
Applicative (GenLocTrace st u) | |
DrawingCtxM (GenLocTrace st u) | |
InterpretUnit u => BranchCursorM (GenLocTrace st u) | |
InterpretUnit u => CursorM (GenLocTrace st u) | |
InterpretUnit u => LocationM (GenLocTrace st u) | |
InterpretUnit u => InsertlM (GenLocTrace st u) | |
UserStateM (GenLocTrace st u) | |
Monoid a => Monoid (GenLocTrace st u a) |
type LocTrace u a = GenLocTrace () u aSource
runGenLocTrace :: InterpretUnit u => st -> GenLocTrace st u a -> LocImage u (a, st)Source
evalGenLocTrace :: InterpretUnit u => st -> GenLocTrace st u a -> LocImage u aSource
Forget the user state LocImage, just return the answer.
execGenLocTrace :: InterpretUnit u => st -> GenLocTrace st u a -> LocImage u stSource
Forget the answer, just return the user state.
stripGenLocTrace :: InterpretUnit u => st -> GenLocTrace st u a -> LocQuery u (a, st)Source
runLocTrace :: InterpretUnit u => LocTrace u a -> LocImage u aSource
Simple version of runGenLocTrace
- run a LocTrace
without
user state.
runLocTrace_ :: InterpretUnit u => LocTrace u a -> LocGraphic uSource