
On Sun, Oct 19, 2014 at 10:03 PM, Brandon Allbery
On Sun, Oct 19, 2014 at 3:00 PM, Michael Snoyman
wrote: And if the instance is really as bad as that, I think having it in base at all is a mistake. All it takes it one library upstream from you to import that module, and you've been infected.
It's useful in ghci.
Which suggests a possible solution: perhaps things like this that are mostly useful from ghci should go into a GHC.Interactive hierarchy.
Based on this thread, I thought it was specifically in GHCi when it was *not* considered helpful. Without the instance: Prelude> print concat <interactive>:2:1: No instance for (Show ([[a0]] -> [a0])) arising from a use of ‘print’ In the expression: print concat In an equation for ‘it’: it = print concat at least tells me what I'm looking at, whereas: Prelude> import Text.Show.Functions Prelude Text.Show.Functions> print concat <function> gives no important info. However, if this is all for GHCi's sake, isn't it really a moot point: Prelude Text.Show.Functions> :t concat concat :: [[a]] -> [a] I'd consider this instance useful for the case of: data Foo = Foo { foo1 :: Int, foo2 :: Double, foo3 :: Char -> Bool } deriving Show Michael