Open philderbeast opened 3 years ago
The kowainik/tomland project also uses megaparsec and accepts underscores in numeric literals with this pull request by the use of sepBy1 (some parseDigit) (char '_')
. The relevant parser in unison is:
Sounds like a good idea! Want to do a PR?
One issue with this is that the underscores would be lost as soon as they enter the codebase, unless the pretty-printer always prints them as well. But that's not a clear win for Unison, as it makes the output of e.g. watch expressions sometimes annoying to use.
Please allow for underscores in numeric literals.