let valargs = get_val_args (Var.varType f) args
genApplication (Left bndr) f (map Left valargs)
--- A single alt case must be a selector. This means thee scrutinee is a simple
+-- A single alt case must be a selector. This means the scrutinee is a simple
-- variable, the alternative is a dataalt with a single non-wild binder that
-- is also returned.
mkConcSm (bndr, expr@(CoreSyn.Case (CoreSyn.Var scrut) b ty [alt]))
-- first is the default case, if there is any.
mkConcSm (bndr, (CoreSyn.Case (CoreSyn.Var scrut) b ty [(_, _, CoreSyn.Var false), (con, _, CoreSyn.Var true)])) = do
scrut' <- MonadState.lift tsType $ varToVHDLExpr scrut
- let cond_expr = scrut' AST.:=: (altconToVHDLExpr con)
+ altcon <- MonadState.lift tsType $ altconToVHDLExpr con
+ let cond_expr = scrut' AST.:=: altcon
true_expr <- MonadState.lift tsType $ varToVHDLExpr true
false_expr <- MonadState.lift tsType $ varToVHDLExpr false
return ([mkCondAssign (Left bndr) cond_expr true_expr false_expr], [])