Skip to content

Too many spaces #75

@georgefst

Description

@georgefst

#67 broke pPrintString "2020-08-22", along with other "broken" Show output from the time package.

Previous output:

2020-08-22

Now:

2020 - 08 - 22

The printer receives:

[NumberLit "2020",Other "-",NumberLit "08",Other "-",NumberLit "22"] :: [Expr]

I'd say it actually does the right thing, since for most combinations of Expr we do want to insert spaces. So I'd class this as an error in the parser, which should instead just return [Other "2020-08-22"]. But this is perhaps a matter of opinion. We would lose syntax highlighting, which I'm fine with, since this isn't an actual numeric literal.

PS. I kept the example simple for the sake of discussion. To demonstrate that this really is an issue consider the readability of 2019 - 02 - 18 20 : 56 : 24.265489 UTC.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions