use unbounded integers

This commit is contained in:
Zachary Snow
2020-07-02 23:33:03 -06:00
parent cd8af036a0
commit 1903bc190d
4 changed files with 31 additions and 24 deletions
+1 -3
View File
@@ -66,9 +66,7 @@ traverseExprM =
where
str = (show size) ++ "'d" ++ (show num)
size = s'
num = if size >= 32
then n' -- already read as 32 bits
else n' `mod` (2 ^ s')
num = n' `mod` (2 ^ s')
_ -> convertCastM (Number s) (Number n)
convertExprM (orig @ (Cast (Right DimsFn{}) _)) =
return orig
+1 -2
View File
@@ -12,7 +12,6 @@
module Convert.TypeOf (convert) where
import Data.List (elemIndex)
import Data.Int (Int32)
import Data.Tuple (swap)
import qualified Data.Map.Strict as Map
@@ -140,7 +139,7 @@ typeof (Repeat reps exprs) = return $ typeOfSize size
typeof other = lookupTypeOf other
-- determines the size and sign of a number literal
parseNumber :: String -> (Int32, Signing)
parseNumber :: String -> (Integer, Signing)
parseNumber s =
case elemIndex '\'' s of
Nothing -> (32, Signed)