A monad for interfacing with external SAT solvers