Final version of constrained monad paper.