- case alts of
- [alt] -> let lbl = mkReturnInfoLabel uniq in
- cgUnboxedTupleAlt uniq cc_slot True alt
- `thenFC` \ abs_c ->
- getSRTInfo srt `thenFC` \ srt_info ->
- absC (CRetDirect uniq abs_c srt_info
- liveness_mask) `thenC`
- returnFC (CaseAlts (CLbl lbl RetRep) Nothing)
- _ -> panic "cgEvalAlts: dodgy case of unboxed tuple type"
+ -- By now, the simplifier should have have turned it
+ -- into case e of (# a,b #) -> e
+ -- There shouldn't be a
+ -- case e of DEFAULT -> e
+ ASSERT2( case (alts, deflt) of { ([_],StgNoDefault) -> True; other -> False },
+ text "cgEvalAlts: dodgy case of unboxed tuple type" )
+ let
+ alt = head alts
+ lbl = mkReturnInfoLabel uniq
+ in
+ cgUnboxedTupleAlt uniq cc_slot True alt `thenFC` \ abs_c ->
+ getSRTInfo srt `thenFC` \ srt_info ->
+ absC (CRetDirect uniq abs_c srt_info liveness_mask) `thenC`
+ returnFC (CaseAlts (CLbl lbl RetRep) Nothing)