wumpus-basic-0.18.0: Basic objects and system code built on Wumpus-Core.

Stabilityhighly unstable



Common types and operations.



data PrimW u a Source

Unit u is a phantom.


PrimW CatPrim a 


Monad (PrimW u) 
Functor (PrimW u) 
Applicative (PrimW u) 
Monoid a => Monoid (PrimW u a) 
Rotate a => Rotate (PrimW u a) 
(u ~ DUnit a, RotateAbout a, ScalarUnit u) => RotateAbout (PrimW u a) 
Scale a => Scale (PrimW u a) 
(u ~ DUnit a, Translate a, ScalarUnit u) => Translate (PrimW u a) 

data Image u a Source


type Graphic u = Image u (UNil u)Source

data Query u a Source


type DImage a = Image Double aSource

Type specialized version of Image.

type DGraphic = Graphic DoubleSource

Type specialized version of Graphic.

zapQuery :: Query u a -> Image u aSource

primGraphic :: CatPrim -> Graphic uSource

Constructor for Primtive graphics.

clipImage :: PrimPath -> Image u a -> Image u aSource

Clip an Image.

class UConvert f whereSource


uconvF :: (Functor t, InterpretUnit u, InterpretUnit u1) => f u (t u) -> f u1 (t u1)Source

uconvZ :: (InterpretUnit u, InterpretUnit u1) => f u a -> f u1 aSource

uconvImageF :: (Functor t, InterpretUnit u, InterpretUnit u1) => Image u (t u) -> Image u1 (t u1)Source

emptyImage :: Monoid a => Image u aSource

Having empty at the specific Image type is useful.

both :: Applicative f => f a -> f b -> f (a, b)Source

ignoreAns :: Functor (f u) => f u a -> f u (UNil u)Source

Note - the kind of f allows fo unit annotation.

replaceAns :: Functor (f u) => a -> f u z -> f u aSource

Replace the answer produced by a graphic object.

class Decorate f whereSource

Decorate an object

oliterate - drops the graphic from the first object replacing it with the graphic from the second.


decorate :: f u a -> f u z -> f u aSource

elaborate :: f u a -> (a -> f u z) -> f u aSource

obliterate :: f u a -> f u z -> f u aSource

hyperlink :: XLink -> f u a -> f u aSource