Commit fd64d4e3 by Zachary Snow

remove two unreachable LHS conversion errors

parent d1d81eb8
...@@ -141,12 +141,7 @@ traverseModuleItem ports scopes = ...@@ -141,12 +141,7 @@ traverseModuleItem ports scopes =
items = items =
[ MIPackageItem $ Decl decl [ MIPackageItem $ Decl decl
, always_comb $ Asgn AsgnOpEq Nothing lhs tmpExpr] , always_comb $ Asgn AsgnOpEq Nothing lhs tmpExpr]
lhs = case exprToLHS expr of Just lhs = exprToLHS expr
Just l -> l
Nothing ->
error $ "bad non-lhs, non-net expr "
++ show expr ++ " connected to output port "
++ portName ++ " of " ++ instanceName
maybeModulePorts = Map.lookup moduleName ports maybeModulePorts = Map.lookup moduleName ports
fixModuleItem other = other fixModuleItem other = other
......
...@@ -144,10 +144,8 @@ traverseLHSM = traverseNestedLHSsM traverseLHSSingleM ...@@ -144,10 +144,8 @@ traverseLHSM = traverseNestedLHSsM traverseLHSSingleM
traverseLHSSingleM lhs = do traverseLHSSingleM lhs = do
let expr = lhsToExpr lhs let expr = lhsToExpr lhs
expr' <- convertExprM expr expr' <- convertExprM expr
case exprToLHS expr' of let Just lhs' = exprToLHS expr'
Just lhs' -> return lhs' return lhs'
Nothing -> error $ "multi-packed conversion created non-LHS from "
++ (show expr) ++ " to " ++ (show expr')
convertExprM :: Expr -> Scoper TypeInfo Expr convertExprM :: Expr -> Scoper TypeInfo Expr
convertExprM = embedScopes convertExpr convertExprM = embedScopes convertExpr
......
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