Skip to content
  • Simon Peyton Jones's avatar
    Improve liberate-case to take account of coercions · 21174275
    Simon Peyton Jones authored
    Note [Scrutinee with cast]
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    Consider this:
        f = \ t -> case (v `cast` co) of
    	         V a b -> a : f t
    
    Exactly the same optimistaion (unrolling one call to f) will work here, 
    despite the cast.  See mk_alt_env in the Case branch of libCase.
    
    This patch does the job.  For a change, it was really easy.
    21174275