Planning data-types.

This is a bunch of types and tests, that are required to do a
pure implementation of the planning algorithms.
I'm wondering whether we should switch to this literate style of spec? IDEA issues aside it's a very nice style. :)