
On Apr 28, 2008, at 17:47 , Fraser Wilson wrote:
Perhaps hack was a strong word. I'm not referring to type synonyms, but to the fact that Prelude's show class happens to have a special show function for lists, which happens to be handy when writing an instance for Show Char. I find the coupling here (between Show and a particular instance of Show, namely Show Char) to be disturbing -- Show should not (if you ask me) contain special machinery for specific instances. Not that I'll lose sleep over it, and of course the benefit (having pretty strings) far outweighs the philosophical cost.
This is what comes of overloading lists as strings. (And what goes along with it, namely slowness. See Data.ByteString for a solution that solves both problems but sadly is unlikely to replace String) -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH