Sunday, October 3, 2010

wumpus-basic

Copperbox revision 1757.

First round of work re-doing paths...

The base data types now have an explicit representation of the empty path and they cache the start and end points as well as the length.

Constructing paths via a monad turns out to be good. I'd been wanting to get rid of the PathM monad but monadic construction handles the path start point nicely - the run function supplies the start point. Without the start point being abstracted, snoc-ing doesn't have good semantics - for instance, the hline combinator cannot work on the empty path because it has no Y-position to take.


I haven't looked at the Connectors module yet, and as the the base types have changed it is currently broken. Connectors seem quite different to paths as the start and end points are known from the start (monadic paths only 'know' the start 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.