Commit d9e890c8 by Zachary Snow

signed size cast shorthand output

parent e80db124
......@@ -118,6 +118,9 @@ traverseExprM =
_ -> return $ Cast (Right s) e
convertCastWithSigningM :: Expr -> Expr -> Signing -> Scoper Type Expr
convertCastWithSigningM (RawNum size) (RawNum val) Signed =
return $ Number $ Decimal (fromIntegral size) True val'
where val' = val `mod` (2 ^ size)
convertCastWithSigningM s e sg = do
details <- lookupElemM $ castFnName s sg
when (details == Nothing) $ injectItem $ MIPackageItem $ castFn s sg
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment