X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;ds=sidebyside;f=c%CE%BBash%2FCLasH%2FNormalize.hs;h=8bc2ef0447bea16a77f70b6fa62651cc93e9d4cf;hb=20e2625d1199e3642b73188471e9804efa1ab763;hp=620482f703547f65f3dff7eb888742f70e67421d;hpb=18fd422156a76abe065036b28a672f5e6077bde4;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git "a/c\316\273ash/CLasH/Normalize.hs" "b/c\316\273ash/CLasH/Normalize.hs" index 620482f..8bc2ef0 100644 --- "a/c\316\273ash/CLasH/Normalize.hs" +++ "b/c\316\273ash/CLasH/Normalize.hs" @@ -569,12 +569,9 @@ casesimpl c expr@(Case scrut bndr ty alts) | not bndr_used = do -- inlinenonrep). if (not wild) && repr then do - -- Create on new binder that will actually capture a value in this + caseexpr <- Trans.lift $ mkSelCase scrut i + -- Create a new binder that will actually capture a value in this -- case statement, and return it. - let bty = (Id.idType b) - id <- Trans.lift $ mkInternalVar "sel" bty - let binders = take i wildbndrs ++ [id] ++ drop (i+1) wildbndrs - let caseexpr = Case scrut b bty [(con, binders, Var id)] return (wildbndrs!!i, Just (b, caseexpr)) else -- Just leave the original binder in place, and don't generate an