Portability | GHC |
---|---|
Stability | highly unstable |
Maintainer | stephen.tetley@gmail.com |
User state class for Drawing monads.
- type family UState m :: *
- class (Applicative m, Monad m) => UserStateM m where
- class InsertlM m where
- class Monad m => LocationM m where
- class LocationM m => CursorM m where
- class CursorM m => BranchCursorM m where
- branchCursor :: m a -> m a
- hmoveby :: (CursorM m, Num u, u ~ DUnit (m ())) => u -> m ()
- vmoveby :: (CursorM m, Num u, u ~ DUnit (m ())) => u -> m ()
Documentation
class (Applicative m, Monad m) => UserStateM m whereSource
getState :: st ~ UState m => m stSource
setState :: st ~ UState m => st -> m ()Source
updateState :: st ~ UState m => (st -> st) -> m ()Source
UserStateM (GenChain st u) | |
UserStateM (GenLocDrawing st u) | |
UserStateM (GenLocTrace st u) | |
UserStateM (GenTraceDrawing st u) |
Monad that collects a graphic trace, insertl
is analogue
to the Writer monad's tell
.
insertl :: u ~ DUnit (m ()) => LocImage u a -> m aSource
insertl_ :: u ~ DUnit (m ()) => LocImage u a -> m (UNil u)Source
InterpretUnit u => InsertlM (GenLocTrace st u) |
class Monad m => LocationM m whereSource
Monad with notion of location - i.e. the current point.
InterpretUnit u => LocationM (GenChain st u) | |
InterpretUnit u => LocationM (GenLocTrace st u) |
class LocationM m => CursorM m whereSource
Monad with turtle-like cursor movememnt.
InterpretUnit u => CursorM (GenLocTrace st u) |
class CursorM m => BranchCursorM m whereSource
Add operations for branching at the current point.
Not all drawings that support tracing support branching. For instance Paths can be built by tracing but they always need a cumulative progression of next point they cannot resrt to the start point and go in a differnt direction.
branchCursor :: m a -> m aSource
Branch is like local
in the Reader monad.
InterpretUnit u => BranchCursorM (GenLocTrace st u) |