Commit fd64d4e3 by Zachary Snow

remove two unreachable LHS conversion errors

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