Skip to content

Commit

Permalink
PLT-4169 Improved documentation of applyCases.
Browse files Browse the repository at this point in the history
This addresses the audit comment:

> File Semantics.hs, Function applyCases, line 597 If multiple
> cases in a case list can apply, the first one is taken. This
> behavior should be better communicated in the specification.
  • Loading branch information
bwbush committed Mar 15, 2023
1 parent fda1d3e commit 08d6f34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion marlowe/src/Language/Marlowe/Core/V1/Semantics.hs
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ getContinuation (MerkleizedInput _ inputContinuationHash continuation) (Merkleiz
else Nothing
getContinuation _ _ = Nothing

-- | Try to apply an input to a list of cases.
-- | Try to apply an input to a list of cases, accepting the first match.
applyCases :: Environment -> State -> Input -> [Case Contract] -> ApplyResult
applyCases env state input (headCase : tailCase) =
let inputContent = getInputContent input :: InputContent
Expand Down

0 comments on commit 08d6f34

Please sign in to comment.