drvfail012.hs:5:33: No instance for (Eq (Ego a)) arising from the 'deriving' clause of a data type declaration Possible fix: use a standalone 'deriving instance' declaration, so you can specify the instance context yourself When deriving the instance for (Ord (Ego a))