Add UndecidableInstances pragma to Direction