simplify (Case e b ty as) = Case (simplify e) b ty (map (\(a,b,e) -> (a,b,simplify e)) as)
simplify (Let bind body) = foldr Let (simplify body) (simplifyBind bind)
simplify (Case e b ty as) = Case (simplify e) b ty (map (\(a,b,e) -> (a,b,simplify e)) as)
simplify (Let bind body) = foldr Let (simplify body) (simplifyBind bind)