Skip to content
Permalink
Browse files

Add diagram to using-marlowe

  • Loading branch information...
palas committed Apr 14, 2019
1 parent 764980d commit 571cf28fccbd157192fb03e94221ce7d5c330b32
Showing with 7 additions and 1 deletion.
  1. +7 −1 docs/tutorial-v2.0/using-marlowe.md
@@ -12,12 +12,18 @@ cd semantics-2.0

## Stepping through contracts

As we saw in the [semantics for Marlowe](./marlowe-semantics.md) the semantics of a single transaction are defined by the function `applyTransaction` of type
As we saw in the [semantics for Marlowe](./marlowe-semantics.md) the semantics of a single transaction are defined by the function `applyTransaction` of type:
```haskell
applyTransaction :: [AnyInput] -> S.Set Person -> BlockNumber -> State -> Contract -> Integer
-> MApplicationResult (Integer, TransactionOutcomes, State, Contract)
```

As illustrated by the diagram:

<p align="center">
<img width="100%" src="pix/applyTransaction.svg">
</p>

We can use the facilities of `ghci` to step through a contract one transaction at a time, and, here, we will do that with the embedded escrow contract contained in [`Escrow.hs`](https://github.com/input-output-hk/marlowe/blob/master/semantics-2.0/examples/pure/Escrow.hs).

To single step, you can work in `ghci` like this, using the facility to make local bindings:

0 comments on commit 571cf28

Please sign in to comment.
You can’t perform that action at this time.