Skip to content

Commit

Permalink
Just replace the broken case with error
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisPenner committed Nov 27, 2024
1 parent eec7498 commit 73fbed4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions unison-runtime/src/Unison/Runtime/Machine.hs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ import Unison.Util.Bytes qualified as By
import Unison.Util.EnumContainers as EC
import Unison.Util.Monoid qualified as Monoid
import Unison.Util.Pretty (toPlainUnbroken)
import Unison.Util.Pretty qualified as P
import Unison.Util.Text qualified as Util.Text
import UnliftIO (IORef)
import UnliftIO qualified
Expand Down Expand Up @@ -652,7 +653,6 @@ eval !env !denv !activeThreads !stk !k r (DMatch mr i br) = do
selectBranch (maskTags t) br
eval !env !denv !activeThreads !stk !k r (NMatch _mr i br) = do
n <- peekOffN stk i

eval env denv activeThreads stk k r $ selectBranch n br
eval !env !denv !activeThreads !stk !k r (RMatch i pu br) = do
(t, stk) <- dumpDataNoTag Nothing stk =<< peekOff stk i
Expand All @@ -662,7 +662,8 @@ eval !env !denv !activeThreads !stk !k r (RMatch i pu br) = do
(ANF.rawTag -> e, ANF.rawTag -> t)
| Just ebs <- EC.lookup e br ->
eval env denv activeThreads stk k r $ selectBranch t ebs
| otherwise -> unhandledErr "eval" env e
| otherwise ->
error . show . PE undefined . P.lit . fromString $ "eval: unhandled ability request"
eval !env !denv !activeThreads !stk !k _ (Yield args)
| asize stk > 0,
VArg1 i <- args =
Expand Down

0 comments on commit 73fbed4

Please sign in to comment.