Generalize DO macro and add monad_traits for expected.