<div dir="ltr">It seems the formatting got mutilated, so I am posting this in proper format, again. I apologize for the spam.<br><br>Ahoy,<br><br>I have the following type class.<br><br>-- | An entity whose underlying information spans zero or more columns<br>class ResultEntity a where<br>    -- | Build an instance of @a@<br>    parseEntity :: RowParser a<br><br>    default parseEntity :: (EligibleDataType meta cons a) => RowParser a<br>    parseEntity = parseGeneric<br><br>The EligibleDataType constraint allows me to construct a RowParser with the help of generics.<br>It is so minimal that I am considering to transform the hole thing into this.<br><br>-- | An entity whose underlying information spans zero or more columns<br>class ResultEntity a where<br>    -- | Build an instance of @a@.<br>    parseEntity :: RowParser a<br><br>instance {-# OVERLAPPABLE #-} (EligibleDataType meta cons a) => ResultEntity a where<br>    parseEntity = parseGeneric<br><br>This makes defining new instances of ResultEntity obsolete for types that already satisfy the EligibleDataType constraint (basically everything that has a Generic instance).<br>And it is still possible to provide a hand-rolled instance.<br><br>Undecidable and overlapping instances seem like a big no-no. Even after reading up on them, I can't get rid of the feeling that this might be dangerous.<br>Is it dangerous? I am targeting GHC 8.0.1 with this.<br><br>- Ole<br></div>