From b916a8939569e1b4a58509241e211bbe81fff2b8 Mon Sep 17 00:00:00 2001 From: Nikolai Kudasov Date: Mon, 9 Dec 2024 12:13:21 +0300 Subject: [PATCH] Separate i16, i32, i64 --- eo-phi-normalizer/src/Language/EO/Phi/Dataize/Atoms.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eo-phi-normalizer/src/Language/EO/Phi/Dataize/Atoms.hs b/eo-phi-normalizer/src/Language/EO/Phi/Dataize/Atoms.hs index 0337204d..e560717b 100644 --- a/eo-phi-normalizer/src/Language/EO/Phi/Dataize/Atoms.hs +++ b/eo-phi-normalizer/src/Language/EO/Phi/Dataize/Atoms.hs @@ -98,9 +98,9 @@ knownAtomsList = -- , ("Lorg_eolang_fs_file_open_process_file", _) -- , ("Lorg_eolang_fs_file_size", _) -- , ("Lorg_eolang_fs_file_touched_touch", _) - ("Lorg_eolang_i16_as_i32", evaluateUnaryDataizationFunChain intToBytes bytesToInt wrapBytesInConstInt extractRho id) - , ("Lorg_eolang_i32_as_i64", evaluateUnaryDataizationFunChain intToBytes bytesToInt wrapBytesInConstInt extractRho id) - , ("Lorg_eolang_i64_as_number", evaluateUnaryDataizationFunChain floatToBytes bytesToInt wrapBytesInConstInt extractRho fromIntegral) + ("Lorg_eolang_i16_as_i32", evaluateUnaryDataizationFunChain int16ToBytes bytesToInt64 wrapBytesInConstInt extractRho fromIntegral) + , ("Lorg_eolang_i32_as_i64", evaluateUnaryDataizationFunChain int32ToBytes bytesToInt64 wrapBytesInConstInt extractRho fromIntegral) + , ("Lorg_eolang_i64_as_number", evaluateUnaryDataizationFunChain floatToBytes bytesToInt64 wrapBytesInConstInt extractRho fromIntegral) , ("Lorg_eolang_i64_div", evaluateIntIntMaybeIntFunChain (\x y -> if y == 0 then Nothing else Just (x `quot` y))) , ("Lorg_eolang_i64_gt", evaluateIntIntBoolFunChain (>)) , ("Lorg_eolang_i64_plus", evaluateIntIntIntFunChain (+)) @@ -117,7 +117,7 @@ knownAtomsList = , ("Lorg_eolang_math_real_ln", evaluateUnaryDataizationFunChain floatToBytes bytesToFloat wrapBytesInConstFloat extractRho log) , ("Lorg_eolang_math_real_pow", evaluateFloatFloatFloatFunChain (**)) , ("Lorg_eolang_math_real_sqrt", evaluateUnaryDataizationFunChain floatToBytes bytesToFloat wrapBytesInConstFloat extractRho sqrt) - , ("Lorg_eolang_number_as_i64", evaluateUnaryDataizationFunChain intToBytes bytesToFloat wrapBytesInConstInt extractRho round) + , ("Lorg_eolang_number_as_i64", evaluateUnaryDataizationFunChain int64ToBytes bytesToFloat wrapBytesInConstInt extractRho round) , ("Lorg_eolang_number_div", evaluateFloatFloatFloatFunChain (/)) , ("Lorg_eolang_number_floor", evaluateUnaryDataizationFunChain intToBytes bytesToFloat wrapBytesInConstInt extractRho floor) , ("Lorg_eolang_number_gt", evaluateBinaryDataizationFunChain boolToBytes bytesToFloat wrapBytesInBytes extractRho (extractLabel "x") (>))