Commit 723f9afa authored by Ian Lynagh's avatar Ian Lynagh

If ghci runs out of labels, panic

parent 6d92f812
......@@ -1534,7 +1534,10 @@ recordItblMallocBc a
getLabelBc :: BcM Word16
getLabelBc
= BcM $ \st -> return (st{nextlabel = 1 + nextlabel st}, nextlabel st)
= BcM $ \st -> do let nl = nextlabel st
when (nl == maxBound) $
panic "getLabelBc: Ran out of labels"
return (st{nextlabel = nl + 1}, nl)
getLabelsBc :: Word16 -> BcM [Word16]
getLabelsBc n
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment