mirror of
https://github.com/grin-compiler/grin.git
synced 2024-09-11 15:37:54 +03:00
add missing primops and fix _prim_int_print type ; it's adhoc
This commit is contained in:
parent
cbeb675a2f
commit
b12b1613eb
@ -18,7 +18,7 @@ checkName name = maybe (error $ "primOp is not defined:" ++ name) (const id) $ M
|
||||
-- TODO: Record effects
|
||||
primOps :: Map String ([PrimType], PrimType)
|
||||
primOps = Map.fromList $
|
||||
[ ("_prim_int_print", ([TInt], TUnit))
|
||||
[ ("_prim_int_print", ([TInt], TInt)) -- HINT: this primop is adhoc, will be removed
|
||||
-- Int
|
||||
, ("_prim_int_add", ([TInt, TInt], TInt))
|
||||
, ("_prim_int_sub", ([TInt, TInt], TInt))
|
||||
@ -52,4 +52,7 @@ primOps = Map.fromList $
|
||||
, ("_prim_float_ge", ([TFloat, TFloat], TBool))
|
||||
, ("_prim_float_lt", ([TFloat, TFloat], TBool))
|
||||
, ("_prim_float_le", ([TFloat, TFloat], TBool))
|
||||
-- Bool
|
||||
, ("_prim_bool_eq", ([TBool, TBool], TBool))
|
||||
, ("_prim_bool_ne", ([TBool, TBool], TBool))
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user