Compute/ConcreteNew.hs: eliminate selections from wildcard tables

This patch also includes some commented out code that was used to search for
the source of code size explosions and an eta expansion bug.
This commit is contained in:
hallgren
2014-06-17 14:47:55 +00:00
parent 6f8e52c944
commit 050d435278
2 changed files with 21 additions and 6 deletions

View File

@@ -298,6 +298,7 @@ select env vv =
--let vs = map (value0 env) ats
i <- maybeErr "no match" $ findIndex (==v2) vs
return (ix (gloc env) "select" rs i)
(VT _ _ [(PW,Bind b)],_) -> {-trace "eliminate wild card table" $-} b []
(v1@(VT _ _ cs),v2) ->
err (\_->ok2 VS v1 v2) (err bug id . valueMatch env) $
match (gloc env) cs v2