all tests are green

This commit is contained in:
Ilya Rezvov
2021-04-19 17:17:25 -07:00
parent 5f28711f6d
commit 54c3cfd697
3 changed files with 10 additions and 4 deletions
+3 -2
View File
@@ -94,7 +94,8 @@ import Language.Wasm.Lexer (
Lexeme(..),
AlexPosn(..),
asFloat,
asDouble
asDouble,
doubleFromInteger
)
}
@@ -401,7 +402,7 @@ float64 :: { Double }
: int {%
let maxInt = round (maxFinite :: Double) in
if $1 <= maxInt && $1 >= -maxInt
then return $ fromIntegral $1
then doubleFromInteger $1
else Left "constant out of range"
}
| f64 {% asDouble $1 }