Skip to content
Snippets Groups Projects
Commit a1ba5fe3 authored by batterseapower's avatar batterseapower
Browse files

Cast things are cheap as well

parent 18494246
No related branches found
No related tags found
No related merge requests found
......@@ -176,6 +176,7 @@ termIsCheap = isCheap . extract
isCheap _ | cALL_BY_NAME = True -- A cunning hack. I think this is all that should be required...
isCheap (Var _) = True
isCheap (Value _) = True
isCheap (Cast e _) = isCheap (extract e)
isCheap (Case e _ _ []) = isCheap (extract e) -- NB: important for pushing down let-bound applications of ``error''
isCheap _ = False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment