[2012-01-19 02:58:25.978235 UTC
,2012-01-19 02:58:25.978235 UTC
]
pretty-show doesn't know how to parse this, which on its own is fine.
The problem is that as soon as one such data type is used in whatever data structure, the whole structure cannot be pretty-printed anymore and is ppShow'ed on one line (as above, though it is a list with 2 elements which ppShow usually formats on multiple lines).
It would be great to have pretty-show ignore all such strange Show instances (like dates) which it doesn't understand and render them as untouched strings while pretty-formatting the surrounding structures.
Probably this needs moving away from using the Haskell lexer as much as it does now to more work being done on the type level, although lexing would still be necessary for some parts (e.g. to nicely format type constructors).
I currently have some problems pretty-showing non-standard things like dates:
yields
while I would expect
pretty-show doesn't know how to parse this, which on its own is fine.
The problem is that as soon as one such data type is used in whatever data structure, the whole structure cannot be pretty-printed anymore and is ppShow'ed on one line (as above, though it is a list with 2 elements which ppShow usually formats on multiple lines).
It would be great to have pretty-show ignore all such strange Show instances (like dates) which it doesn't understand and render them as untouched strings while pretty-formatting the surrounding structures.
Probably this needs moving away from using the Haskell lexer as much as it does now to more work being done on the type level, although lexing would still be necessary for some parts (e.g. to nicely format type constructors).