From a97a53c406ca4da95059a95a4f3d6452eb87b018 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Wed, 11 Nov 2009 14:38:26 +0100 Subject: [PATCH] Actually make the scrutinee binder removal not crash. --- "c\316\273ash/CLasH/Normalize.hs" | 2 ++ 1 file changed, 2 insertions(+) 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) -------------------------------- -- 2.30.2