Can I use special characters like tabulations and newlines in Show?
问题 data Pair = P Int Int instance Show Pair where show (P n1 n2) = (show n1) ++ "\t" ++ (show n2) Result: GHCi, version 7.6.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. [1 of 1] Compiling Main ( labn.hs, interpreted ) Ok, modules loaded: Main. *Main> show (P 5 6) "5\t6" OK for a pair of ints this might be an artificial problem, but my actual use case is