There are a few issues with extended numeric literals i have seen when poking around floskell Which uses HSE
Ill try to capture these below
HexFloatLiterals produce a series of InifixApp and QVarOp, which ends up being ambiguous
They both produce the following (cleaned up for visibility)
Both f 0xF . FFp12 and f 0xF.FFp12 (with -XHexFloatLiterals, ghci and ghc turn this one into a Float)
produce
The second more broken issue is combined with exponent syntax:
It splits the int on the first _ and produces an App followed by a QVarOp +
6.022_140_857e+23
produces
There are a few issues with extended numeric literals i have seen when poking around floskell Which uses HSE Ill try to capture these below
HexFloatLiterals produce a series of InifixApp and QVarOp, which ends up being ambiguous They both produce the following (cleaned up for visibility) Both
f 0xF . FFp12
andf 0xF.FFp12
(with -XHexFloatLiterals, ghci and ghc turn this one into a Float) produceNumericUnderscores produce 2 different issues. The first, simpler issue: It splits the int on the first
_
and produces an App3_000
producesThe second more broken issue is combined with exponent syntax: It splits the int on the first
_
and produces an App followed by a QVarOp +6.022_140_857e+23
produces