@@ -325,33 +325,33 @@ zeroExtend : Bits n -> Bits (n+m)
325325zeroExtend (MkBits x) = MkBits (zext' x)
326326
327327%assert_total
328−intToBits' : Int -> machineTy (nextBytes n)
328+intToBits' : Integer -> machineTy (nextBytes n)
329329intToBits' {n=n} x with (nextBytes n)
330330 | O = let pad = getPad {n=0} n in
331− prim__lshrB8 (prim__shlB8 (prim__truncInt_B8 x) pad) pad
331+ prim__lshrB8 (prim__shlB8 (prim__truncBigInt_B8 x) pad) pad
332332 | S O = let pad = getPad {n=1} n in
333− prim__lshrB16 (prim__shlB16 (prim__truncInt_B16 x) pad) pad
333+ prim__lshrB16 (prim__shlB16 (prim__truncBigInt_B16 x) pad) pad
334334 | S (S O) = let pad = getPad {n=2} n in
335− prim__lshrB32 (prim__shlB32 (prim__truncInt_B32 x) pad) pad
335+ prim__lshrB32 (prim__shlB32 (prim__truncBigInt_B32 x) pad) pad
336336 | S (S (S _)) = let pad = getPad {n=3} n in
337− prim__lshrB64 (prim__shlB64 (prim__truncInt_B64 x) pad) pad
337+ prim__lshrB64 (prim__shlB64 (prim__truncBigInt_B64 x) pad) pad
338338
339339public
340−intToBits : Int -> Bits n
340+intToBits : Integer -> Bits n
341341intToBits n = MkBits (intToBits' n)
342342
343−instance Cast Int (Bits n) where
343+instance Cast Integer (Bits n) where
344344 cast = intToBits
345345
346−bitsToInt' : machineTy (nextBytes n) -> Int
346+bitsToInt' : machineTy (nextBytes n) -> Integer
347347bitsToInt' {n=n} x with (nextBytes n)
348− | O = prim__zextB8_Int x
349− | S O = prim__zextB16_Int x
350− | S (S O) = prim__zextB32_Int x
351− | S (S (S _)) = prim__truncB64_Int x
348+ | O = prim__zextB8_BigInt x
349+ | S O = prim__zextB16_BigInt x
350+ | S (S O) = prim__zextB32_BigInt x
351+ | S (S (S _)) = prim__zextB64_BigInt x
352352
353353public
354−bitsToInt : Bits n -> Int
354+bitsToInt : Bits n -> Integer
355355bitsToInt (MkBits x) = bitsToInt' x
356356
357357-- Zero out the high bits of a truncated bitstring