| Portability | GHC |
|---|---|
| Stability | unstable |
| Maintainer | stephen.tetley@gmail.com |
Wumpus.Basic.Monads.TurtleMonad
Description
Turtle monad transformer.
The Turtle monad embodies the LOGO style of imperative drawing - sending commands to update the a cursor.
While Wumpus generally aims for a more compositional, "coordinate-free" style of drawing, some types of diagram are more easily expressed in the LOGO style.
Turtle is only a transformer - it is intended to be run within
a Drawing.
- module Wumpus.Basic.Monads.TurtleClass
- data TurtleT u m a
- runTurtleT :: (Monad m, Num u) => TurtleConfig u -> (Int, Int) -> TurtleT u m a -> m a
- data TurtleDrawing u a
- runTurtleDrawing :: Num u => TurtleConfig u -> (Int, Int) -> DrawingContext -> TurtleDrawing u a -> (a, HPrim u)
- execTurtleDrawing :: Num u => TurtleConfig u -> (Int, Int) -> DrawingContext -> TurtleDrawing u a -> HPrim u
Re-exports
Turtle transformer
runTurtleT :: (Monad m, Num u) => TurtleConfig u -> (Int, Int) -> TurtleT u m a -> m aSource
Turtle combined with Drawing
data TurtleDrawing u a Source
Instances
| Monad (TurtleDrawing u) | |
| Functor (TurtleDrawing u) | |
| Applicative (TurtleDrawing u) | |
| TurtleM (TurtleDrawing u) | |
| DrawingCtxM (TurtleDrawing u) | |
| TraceM (TurtleDrawing u) | |
| TurtleScaleM (TurtleDrawing u) u |
runTurtleDrawing :: Num u => TurtleConfig u -> (Int, Int) -> DrawingContext -> TurtleDrawing u a -> (a, HPrim u)Source
execTurtleDrawing :: Num u => TurtleConfig u -> (Int, Int) -> DrawingContext -> TurtleDrawing u a -> HPrim uSource