
On 2014-10-19 at 12:20:23 +0200, Herbert Valerio Riedel wrote: [...]
instance Show (a -> b) where showsPrec _ _ = showString "<function>"
PS: An effect of having this instance made default in Prelude is that GHCi would show a somewhat different result in some cases (not sure though if this a good or bad thing): GHCi, version 7.8.3: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. λ:2> id <interactive>:2:1: No instance for (Show (a0 -> a0)) arising from a use of ‘print’ In a stmt of an interactive GHCi command: print it λ:3> import Text.Show.Functions λ:4> id <function> it :: a -> a Cheers, hvr