Commit e5e99b29 by Zachary Snow

Revert "avoid unnecessary unased-unsized casts in assignments"

This reverts commit 51f2d2bb.
parent cc9f7f46
......@@ -117,7 +117,8 @@ convertModuleItemM other = return $ convertModuleItem other
convertModuleItem :: ModuleItem -> ModuleItem
convertModuleItem =
traverseExprs (convertExpr SelfDetermined) .
traverseTypes (traverseNestedTypes convertType)
traverseTypes (traverseNestedTypes convertType) .
traverseAsgns convertAsgn
literalFor :: Char -> Expr
literalFor 'Z' = literalFor 'z'
......@@ -143,6 +144,11 @@ sizedLiteralFor expr ch =
Cast (Right size) (literalFor ch)
where size = DimsFn FnBits $ Right expr
convertAsgn :: (LHS, Expr) -> (LHS, Expr)
convertAsgn (lhs, expr) =
(lhs, convertExpr context expr)
where context = ContextDetermined $ lhsToExpr lhs
convertExpr :: ExprContext -> Expr -> Expr
convertExpr _ (DimsFn fn (Right e)) =
DimsFn fn $ Right $ convertExpr SelfDetermined e
......
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