X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=c%CE%BBash%2FCLasH%2FVHDL%2FGenerate.hs;h=da8be8a7afda04735e7ba3e07abae4c5252ae602;hb=d2fb40118bbcc404ea242d57dd6be196e70d171d;hp=dee2a794694394b371f26129a1e79c54ae6c5da2;hpb=a8e9b068368bf974388fd8f929e0ba1aa9220f29;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git "a/c\316\273ash/CLasH/VHDL/Generate.hs" "b/c\316\273ash/CLasH/VHDL/Generate.hs" index dee2a79..da8be8a 100644 --- "a/c\316\273ash/CLasH/VHDL/Generate.hs" +++ "b/c\316\273ash/CLasH/VHDL/Generate.hs" @@ -234,7 +234,8 @@ 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], [])