Portability | GHC |
---|---|

Stability | unstable |

Maintainer | stephen.tetley@gmail.com |

Turtle monad and 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.

# Documentation

Monad (Turtle u) | |

Functor (Turtle u) | |

Applicative (Turtle u) | |

TurtleM (Turtle u) | |

TurtleScaleM (Turtle u) u |

runTurtleT :: (Monad m, Num u) => TurtleConfig u -> (Int, Int) -> TurtleT u m a -> m aSource

data TurtleDrawing u a Source

Monad (TurtleDrawing u) | |

Functor (TurtleDrawing u) | |

Applicative (TurtleDrawing u) | |

TurtleM (TurtleDrawing u) | |

DrawingCtxM (TurtleDrawing u) | |

TurtleScaleM (TurtleDrawing u) u | |

TraceM (TurtleDrawing u) u |

runTurtleDrawing :: Num u => TurtleConfig u -> (Int, Int) -> DrawingAttr -> TurtleDrawing u a -> (a, Graphic u)Source

execTurtleDrawing :: Num u => TurtleConfig u -> (Int, Int) -> DrawingAttr -> TurtleDrawing u a -> Graphic uSource