
Edward Z. Yang wrote:
It seems to me that there is a possibility we could reify some information that is traditionally specified in the documentation: that is, what functions must be defined by a minimal instance, which could then give GHC enough information to give meaningful warnings if not all functions for a minimal instance are provided.
It definitely should not be so easy to create runtime crashes by not providing enough method implementations at compile time. In this case, though, showsPrec and readsPrec only exist for historical reasons. Nowadays I don't think anyone would consider ReadS or ShowS for a parser or pretty-printer so complex that it needs to consider operator precedence. It would be better to deprecate them and remove them, together with the default method implementations for shows and reads. Regards, Yitz