cdepillabout / pretty-simple

pretty-printer for Haskell data types that have a Show instance
https://hackage.haskell.org/package/pretty-simple
BSD 3-Clause "New" or "Revised" License
243 stars 29 forks source link

Numbers (prefixed with 0x) have a space put between 0 and x #89

Closed expipiplus1 closed 3 years ago

expipiplus1 commented 3 years ago
λ> pStringNoColor "0x0"
"0 x0"
georgefst commented 3 years ago

This is another instance of #75, which is increasingly looking like a priority.

expipiplus1 commented 3 years ago

Is it a duplicate? That seems to be dealing with spaces around operators, but this is a valid Haskell numeric literal being mangled (albeit one which isn't generated by derived show instances).

georgefst commented 3 years ago

It has the same root cause, and solution.

expipiplus1 commented 3 years ago

Sure, but I think fixing this would be much less controversial than the operator space case.

Either way it looks like the spaces will be removed so no biggie.

(I wonder if scientific notation suffers too, 10e5 etc..)

On Fri, Dec 18, 2020, 10:04 PM George Thomas notifications@github.com wrote:

It has the same root cause, and solution.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cdepillabout/pretty-simple/issues/89#issuecomment-748100560, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGRJXBUTMM5LUIFROLCO2LSVNOMLANCNFSM4VAYYNAQ .