[jhc] darcs patch: various library fixes, added minusPtr, o... (and 2 more)