Last active
October 28, 2019 19:23
-
-
Save rudolph9/f0215453705845101342b2d9fa80b6b5 to your computer and use it in GitHub Desktop.
Marlowe Smart Contract
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
module Swap where | |
import Language.Marlowe | |
main :: IO () | |
main = print . pretty $ contract | |
{- Simply swap two payments between parties -} | |
contract :: Contract | |
contract = | |
When aliceChoice | |
(When bobChoice | |
(If (aliceChosen `ValueEQ` bobChosen) | |
agreement | |
arbitrate)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment