You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Haskell implementation will happily parse an arbitrarily large index on an identifier (although it looks like something's overflowing either in the representation or the encoding):
scala>importorg.dhallj.parser.DhallParserimportorg.dhallj.parser.DhallParser
scala>DhallParser.parse("x @ 9223372036854775807")
res0: org.dhallj.core.Expr.Parsed= x@9223372036854775807
scala>DhallParser.parse("x @ 9223372036854775808")
java.lang.NumberFormatException:For input string: "9223372036854775808"
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:68)
at java.base/java.lang.Long.parseLong(Long.java:703)
...
I think this is fine, since nobody's ever going to bind 9,223,372,036,854,775,808 xs, so this will never type-check, anyway, but we should document the difference and maybe wrap the NumberFormatException in an ParseException.
The text was updated successfully, but these errors were encountered:
The Haskell implementation will happily parse an arbitrarily large index on an identifier (although it looks like something's overflowing either in the representation or the encoding):
We stop at
Long.MaxValue
:I think this is fine, since nobody's ever going to bind 9,223,372,036,854,775,808
x
s, so this will never type-check, anyway, but we should document the difference and maybe wrap theNumberFormatException
in anParseException
.The text was updated successfully, but these errors were encountered: