Sunday, August 15, 2010

wumpus-basic

Copperbox revision 1598.

I've changed AGraphic to be a dual representation rather than a dual representation + drawing attribute update function.

Dual representations were (probably) pioneered by Antony Courtney's Haven - an Image in Haven was both a function from Point -> Graphic (how to draw) and a function from Point -> Region (supporting point in polygon testing).

In Wumpus-Basic an AGraphic is essentially both a function from Point -> Graphic and a function from Point -> a where a might be a dot (supporting anchors) or a path (supporting midpoint). Actually it is a bit more complicated that this - a static param DrawingAttr (via a reader monad) is part of the type and Points might be ignored - a connector for instance isn't a function "from Point".

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.