Tuesday, November 16, 2010

wumpus-basic

Copperbox revision 1873.

I've added a prototype of a new drawing object for Wumpus-Basic to use rather than directly use Wumpus-Core's Picture.

Unlike the Wumpus-Core picture type this Drawing object has a DrawingContext so it can use font metrics which are loaded at run time. Font metrics are loaded in IO, and added to DrawingContext a Drawing is then run with the DrawingContext to produce a file Picture, which is written to file in IO. The new Drawing object supports affine transformations as-per the corresponding Picture type and it also has a version of the PictureLanguage combinators.

The one main sticking point is that although a Drawing is basically an evaluated TraceDrawing it cannot use the value produced by a TraceDrawing (TraceDrawing is basically a Writer monad, so it produces two values). So far TraceDrawings have always produced (), so this isn't isn't a problem for any existing code but maybe there are useful values a TraceDrawing can produce?

Blog Archive

About Me

My photo
Disambiguating biog as there are a few Stephen Tetley's in the world. I'm neither a cage fighter or yachtsman. I studied Fine Art in the nineties (foundation Bradford 1992, degree Cheltenham 1992 - 95) then Computing part-time at Leeds Met graduating in 2003. I'm the Stephen Tetley on Haskell Cafe and Stackoverflow.