@@ -157,14 +157,16 @@ primitives =
157157 Prim (UN "prim__truncB64_32") (ty [B64Type] B32Type) 1 trunc64_32
158158 (1, LB64T32) total,
159159
160− Prim (UN "prim__intToBits8") (ty [IType] B8Type) 1 intToBits8
161− (1, LB8) total,
162− Prim (UN "prim__intToBits16") (ty [IType] B16Type) 1 intToBits16
163− (1, LB16) total,
164− Prim (UN "prim__intToBits32") (ty [IType] B32Type) 1 intToBits32
165− (1, LB32) total,
166− Prim (UN "prim__intToBits64") (ty [IType] B64Type) 1 intToBits64
167− (1, LB64) total,
160+ Prim (UN "prim__intToB8") (ty [IType] B8Type) 1 intToBits8
161+ (1, LIntB8) total,
162+ Prim (UN "prim__intToB16") (ty [IType] B16Type) 1 intToBits16
163+ (1, LIntB16) total,
164+ Prim (UN "prim__intToB32") (ty [IType] B32Type) 1 intToBits32
165+ (1, LIntB32) total,
166+ Prim (UN "prim__intToB64") (ty [IType] B64Type) 1 intToBits64
167+ (1, LIntB64) total,
168+ Prim (UN "prim__B32ToInt") (ty [B32Type] IType) 1 bits32ToInt
169+ (1, LB32Int) total,
168170
169171 Prim (UN "prim__addBigInt") (ty [BIType, BIType] BIType) 2 (bBin (+))
170172 (2, LBPlus) total,
@@ -409,6 +411,8 @@ intToBits32 _ = Nothing
409411intToBits64 [VConstant (I x)] = Just $ toB64 x
410412intToBits64 _ = Nothing
411413
414+bits32ToInt [VConstant (B32 x)] = Just $ VConstant (I (fromIntegral x))
415+
412416c_intToStr [VConstant (I x)] = Just $ VConstant (Str (show x))
413417c_intToStr _ = Nothing
414418c_strToInt [VConstant (Str x)] = case reads x of