wumpus-drawing-0.4.0: High-level drawing objects built on Wumpus-Basic.

Stabilityhighly unstable




Writer monad with imperative turtle style movement to build LocGraphics and references allowing connectors between objects.

Note - references are not feedback. Subsequent nodes cannot be place at anchors of previous nodes - anchors only allow connectors to be drawn between located nodes.



class Monad m => LocTraceM m whereSource

insertl analogue to Writer monad tell.


insertl :: MonUnit (m ()) ~ u => LocGraphic u -> m ()Source

insertl_ :: MonUnit (m ()) ~ u => LocImage u a -> m ()Source

moveBy :: MonUnit (m ()) ~ u => Vec2 u -> m ()Source

location :: MonUnit (m ()) ~ u => m (Vec2 u)Source


Num u => LocTraceM (LocTrace u) 
(Floating u, InterpretUnit u) => LocTraceM (PathSpec u) 
(Monad m, Num u) => LocTraceM (LocTraceT u m) 
Num u => LocTraceM (RefTrace u z) 
(Monad m, Floating u, InterpretUnit u) => LocTraceM (PathSpecT u m) 
(Monad m, Num u) => LocTraceM (RefTraceT u z m) 

data RefTrace u z a Source


data RefTraceT u z m a Source


Monad m => Monad (RefTraceT u z m) 
Monad m => Functor (RefTraceT u z m) 
Monad m => Applicative (RefTraceT u z m) 
(Monad m, Num u) => LocTraceM (RefTraceT u z m) 

data Ref Source

class Monad m => RefTraceM m whereSource

Associated Types

type MonRef m :: *Source


insertRef :: (MonRef m ~ a, MonUnit (m ()) ~ u) => LocImage u a -> m RefSource

linkRef :: (MonRef m ~ a, MonUnit (m ()) ~ u) => LinkRef u a -> m ()Source


Num u => RefTraceM (RefTrace u z) 

runRefTrace :: Num u => RefTrace u ans a -> LocImage u aSource

runRefTraceT :: (Monad m, Num u) => RefTraceT u ans m a -> m (LocImage u a)Source

unaryLink :: (ans -> Point2 u) -> LocGraphic u -> Ref -> LinkRef u ansSource

binaryLink :: (ans -> Point2 u) -> (ans -> Point2 u) -> ConnectorGraphic u -> Ref -> Ref -> LinkRef u ansSource

multiwayLink :: (ans -> Point2 u) -> ([Point2 u] -> Graphic u) -> [Ref] -> LinkRef u ansSource