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

Stabilityhighly unstable



Image and Graphic types - these are functional types from the DrawingContext to a graphic primitive.



type Graphic u = CF (GraphicAns u)Source

Graphic - function from the DrawingContext to a graphic primitive.

type Image u a = CF (ImageAns u a)Source

Image - function from the DrawingContext to a polymorphic answer and a graphic primitive.

The answer is expected to be a Functor.

type DImage a = Image Double aSource

Type specialized version of Image.

type DGraphic = Graphic DoubleSource

Type specialized version of Graphic.

intoImage :: Query a -> Graphic u -> Image u aSource

intoImage : query * graphic -> Image

Build an Image from a context function (CF) that generates the answer and a Graphic that draws the Image.

graphic_ :: Image u a -> Graphic uSource

Downcast an Image to a Graphic.

This means forgetting the answer of the Image, replacing it with ().

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

Use this to convert Graphic or Image with Functor answer.