drvfail015.hs:10:19: Illegal instance declaration for `Eq T' (All instance types must be of the form (T t1 ... tn) where T is not a synonym. Use -XTypeSynonymInstances if you want to disable this.) In the stand-alone deriving instance for `Eq T' drvfail015.hs:13:1: The data constructors of `Handle' are not all in scope so you cannot derive an instance for it In the stand-alone deriving instance for `Eq Handle'