Remove usage of UndecidableInstances.

Not using type aliases in ReaderM instances allows us to remove the
usage of UndecidableInstances.