UndecidableInstances is needed to support GHC <= 7.6