Using the Haskell Editor
As an experienced Haskell developer you can use the Haskell editor to render Marlowe code. Marlowe is written as a Haskell data type, and thus it is straightforward to generate Marlowe smart contracts using Haskell.
To use the Haskell editor follow these steps:
- Open the Marlowe Playground.
- Click Start coding!
- Select the Haskell version from the menu.
You will see a window like this:
- Now you can start coding in Haskell.
Alternatively, you can use some example contracts to work with.
- Describe a contract in the editor. For this, define a top-level value contract of type Contract, add conditions, and close the contract.
The following window will open for an Escrow contract.
- Click Compile to convert this value from Haskell into Marlowe.
- Then, click Send to Simulator.
The Simulator allows you to simulate Marlowe contracts transaction by transaction. You can find more instructions on how to simulate Marlowe contracts in section 10.3 of the Marlowe tutorial.
Find official copy of this document here:
https://docs.cardano.org/en/latest/marlowe/get-started-haskell.html
© Copyright 2020, IOHK Revision d7c21086.
Find this document translated into other languages at: http://CardanoForTheWorld.com