From: Matthijs Kooijman Date: Wed, 11 Nov 2009 13:38:26 +0000 (+0100) Subject: Actually make the scrutinee binder removal not crash. X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fmaster-project%2Fc%CE%BBash.git;a=commitdiff_plain;h=a97a53c406ca4da95059a95a4f3d6452eb87b018 Actually make the scrutinee binder removal not crash. --- diff --git "a/c\316\273ash/CLasH/Normalize.hs" "b/c\316\273ash/CLasH/Normalize.hs" index 4f02800..2c7a95e 100644 --- "a/c\316\273ash/CLasH/Normalize.hs" +++ "b/c\316\273ash/CLasH/Normalize.hs" @@ -419,6 +419,8 @@ scrutbndrremove (Case (Var scrut) bndr ty alts) | bndr_used = do expr' <- substitute bndr (Var scrut) expr return (con, bndrs, expr') wild = MkCore.mkWildBinder (Id.idType bndr) +-- Leave all other expressions unchanged +scrutbndrremove expr = return expr scrutbndrremovetop = everywhere ("scrutbndrremove", scrutbndrremove) --------------------------------