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:

  1. Open the Marlowe Playground.

  2. Click Start coding!

  3. Select the Haskell version from the menu.

    You will see a window like this:

Haskell

  1. Now you can start coding in Haskell.

    Alternatively, you can use some example contracts to work with.

  2. 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:

Escrow

  1. Click Compile to convert this value from Haskell into Marlowe.

  2. Then, click Send to Simulator.

    The Simulator allows you to simulate Marlowe contracts transaction by transaction. You can find more instructions on how to use the Haskell editor in the Marlowe tutorial.

© IOHK 2015 - 2022


Cardano Logo

Cardano is an open-source project.

Cardano is a software platform ONLY and does not conduct any independent diligence on, or substantive review of, any blockchain asset, digital currency, cryptocurrency or associated funds. You are fully and solely responsible for evaluating your investments, for determining whether you will exchange blockchain assets based on your own judgement, and for all your decisions as to whether to exchange blockchain assets with Cardano. In many cases, blockchain assets you exchange on the basis of your research may not increase in value, and may decrease in value. Similarly, blockchain assets you exchange on the basis of your research may fall or rise in value after your exchange.

Past performance is not indicative of future results. Any investment in blockchain assets involves the risk of loss of part or all of your investment. The value of the blockchain assets you exchange is subject to market and other investment risks