Skip to content

Commit

Permalink
Ignore tryAlt Result values in Core.Normalise.Eval
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex1005a authored and CodingCellist committed May 9, 2023
1 parent 2cafbe2 commit 6b768f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Core/Normalise/Eval.idr
Original file line number Diff line number Diff line change
Expand Up @@ -406,15 +406,15 @@ parameters (defs : Defs, topopts : EvalOpts)
log "eval.casetree.stuck" 2 "Ran out of alternatives"
pure GotStuck
findAlt env loc opts fc stk val (x :: xs)
= do (Result (MkTermEnv newLoc val)) <- tryAlt env loc opts fc stk val x
= do res@(Result {}) <- tryAlt env loc opts fc stk val x
| NoMatch => findAlt env loc opts fc stk val xs
| GotStuck => do
logC "eval.casetree.stuck" 5 $ do
val <- toFullNames val
x <- toFullNames x
pure $ "Got stuck matching \{show val} against \{show x}"
pure GotStuck
pure (Result (MkTermEnv newLoc val))
pure res

evalTree : {auto c : Ref Ctxt Defs} ->
{args, free : _} -> Env Term free -> LocalEnv free args ->
Expand Down

0 comments on commit 6b768f2

Please sign in to comment.