summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/simplStg/RepType.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/simplStg/RepType.hs b/compiler/simplStg/RepType.hs
index 7e42a866b0..ca8438eec1 100644
--- a/compiler/simplStg/RepType.hs
+++ b/compiler/simplStg/RepType.hs
@@ -199,7 +199,9 @@ ubxSumRepType constrs0 =
| Just s' <- s `fitsIn` es
= -- found a slot, use it
s' : merge ess ss
-
+ | s < es
+ = -- we need a new slot and this is the right place for it
+ s : merge (es : ess) ss
| otherwise
= -- keep searching for a slot
es : merge ess (s : ss)