
Hi, I am using the ghc-5.04 module Text.Pretty.HughesPJ (originally "Pretty" in the "text" package) to do some formatting. It works great, but has one small problem: the output always uses tab for 8 spaces. For example: d = text "abc" $+$ nest 8 (text "bcd") $+$ text "cde" s = render d will have a tab before "bcd", not 8 spaces. I have tested this on both Solaris 2.8 and Linux. Is there a way to change this behavior and make it use spaces always? I looked at the code but cannot find related information. Thanks! Di, Yu 7.13 __________________________________________________ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com

Yu Di
Hi, I am using the ghc-5.04 module Text.Pretty.HughesPJ (originally "Pretty" in the "text" package) to do some formatting. It works great, but has one small problem: the output always uses tab for 8 spaces. For example:
d = text "abc" $+$ nest 8 (text "bcd") $+$ text "cde" s = render d
will have a tab before "bcd", not 8 spaces. I have tested this on both Solaris 2.8 and Linux.
Is there a way to change this behavior and make it use spaces always? I looked at the code but cannot find related information.
Btw what's wrong with the tab? I guess you can always convert the tabs ('\t') to spaces after pretty printting... The tab seems to come from: indent n | n >= 8 = '\t' : indent (n - 8) | otherwise = spaces n Hth, Jens
participants (2)
-
Jens Petersen
-
Yu Di