@@ -157,14 +157,16 @@ primitives =
157 Prim (UN "prim__truncB64_32") (ty [B64Type] B32Type) 1 trunc64_32
157 Prim (UN "prim__truncB64_32") (ty [B64Type] B32Type) 1 trunc64_32
158 (1, LB64T32) total,
158 (1, LB64T32) total,
160− Prim (UN "prim__intToBits8") (ty [IType] B8Type) 1 intToBits8
160+ Prim (UN "prim__intToB8") (ty [IType] B8Type) 1 intToBits8
161− (1, LB8) total,
161+ (1, LIntB8) total,
162− Prim (UN "prim__intToBits16") (ty [IType] B16Type) 1 intToBits16
162+ Prim (UN "prim__intToB16") (ty [IType] B16Type) 1 intToBits16
163− (1, LB16) total,
163+ (1, LIntB16) total,
164− Prim (UN "prim__intToBits32") (ty [IType] B32Type) 1 intToBits32
164+ Prim (UN "prim__intToB32") (ty [IType] B32Type) 1 intToBits32
165− (1, LB32) total,
165+ (1, LIntB32) total,
166− Prim (UN "prim__intToBits64") (ty [IType] B64Type) 1 intToBits64
166+ Prim (UN "prim__intToB64") (ty [IType] B64Type) 1 intToBits64
168+ Prim (UN "prim__B32ToInt") (ty [B32Type] IType) 1 bits32ToInt
167− (1, LB64) total,
169+ (1, LB32Int) total,
169 Prim (UN "prim__addBigInt") (ty [BIType, BIType] BIType) 2 (bBin (+))
171 Prim (UN "prim__addBigInt") (ty [BIType, BIType] BIType) 2 (bBin (+))
170 (2, LBPlus) total,
172 (2, LBPlus) total,
@@ -409,6 +411,8 @@ intToBits32 _ = Nothing
409intToBits64 [VConstant (I x)] = Just $ toB64 x
411intToBits64 [VConstant (I x)] = Just $ toB64 x
410intToBits64 _ = Nothing
412intToBits64 _ = Nothing
414+bits32ToInt [VConstant (B32 x)] = Just $ VConstant (I (fromIntegral x))
412c_intToStr [VConstant (I x)] = Just $ VConstant (Str (show x))
416c_intToStr [VConstant (I x)] = Just $ VConstant (Str (show x))
413c_intToStr _ = Nothing
417c_intToStr _ = Nothing
414c_strToInt [VConstant (Str x)] = case reads x of
418c_strToInt [VConstant (Str x)] = case reads x of