diff options
Diffstat (limited to 'compiler/deSugar/DsUtils.lhs')
-rw-r--r-- | compiler/deSugar/DsUtils.lhs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/deSugar/DsUtils.lhs b/compiler/deSugar/DsUtils.lhs index 6a46bbe93d..626b6ee795 100644 --- a/compiler/deSugar/DsUtils.lhs +++ b/compiler/deSugar/DsUtils.lhs @@ -291,7 +291,7 @@ mkGuardedMatchResult pred_expr (MatchResult _ body_fn) mkCoPrimCaseMatchResult :: Id -- Scrutinee -> Type -- Type of the case -> [(Literal, MatchResult)] -- Alternatives - -> MatchResult + -> MatchResult -- Literals are all unlifted mkCoPrimCaseMatchResult var ty match_alts = MatchResult CanFail mk_case where @@ -300,8 +300,10 @@ mkCoPrimCaseMatchResult var ty match_alts return (Case (Var var) var ty ((DEFAULT, [], fail) : alts)) sorted_alts = sortWith fst match_alts -- Right order for a Case - mk_alt fail (lit, MatchResult _ body_fn) = do body <- body_fn fail - return (LitAlt lit, [], body) + mk_alt fail (lit, MatchResult _ body_fn) + = ASSERT( not (litIsLifted lit) ) + do body <- body_fn fail + return (LitAlt lit, [], body) mkCoAlgCaseMatchResult |