Feldspar/feldspar-language — pull request #33 by pjonsson (2012-11-02 15:30:30+00:00)
Title: Push selects over conditions to eliminate some unecessary tuples.

I only have a rough semantic understanding of how the optimizations work, for all I know we could be traversing the AST a million times. It does work though:

For the program:
```haskell
cexp9 :: Data WordN -> Data WordN -> Data WordN
cexp9 a b = c+d
where
(c,d) = (a==b) ? ((a,2), (b,3))
```

```lisp
> printExpr cexp9
(\var0 -> (\var1 -> (letBind (var0 == var1) (\var2 -> ((condition var2 var0 var1) + (condition var2 2 3))))))
```