about template haskell's pretty print: 3 % 5 -> 3 / 5

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

about template haskell's pretty print: 3 % 5 -> 3 / 5

PAF01143@nifty.ne.jp
Hello!

I think it's better that the ghc can read what is printed by pretty
printer.

Now:

pprLit 0 (RationalL 3.5) => 7 % 2

I want:

pprLit 0 (RationalL 3.5) => 7 / 2

I'll send patch

---

pprLit i (RationalL rat) = parensIf (i > noPrec) $
        integer (numerator rat) <+> char '/' <+> integer (denominator rat)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: thPprRationalL.patch
Type: text/x-diff
Size: 909 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130827/1a1fd369/attachment.patch>