This file contains hidden or 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
{"valueParameterInfo":[["Amount paid by party",{"valueParameterFormat":{"contents":[6,"₳"],"tag":"DecimalFormat"},"valueParameterDescription":"Amount that the _**party**_ will deposit at the beginning of the contract."}],["Amount paid by counterparty",{"valueParameterFormat":{"contents":[6,"₳"],"tag":"DecimalFormat"},"valueParameterDescription":"Amount that the _**counterparty**_ will deposit at the beginning of the contract."}],["Amount of Ada to use as asset",{"valueParameterFormat":{"contents":[6,"₳"],"tag":"DecimalFormat"},"valueParameterDescription":"Amount of Ada whose price in dollars change to monitor."}]],"timeParameterDescriptions":[["Party deposit deadline","The _amount paid by party_ must be deposited by this deadline, otherwise the contract is cancelled."],["Counterparty deposit deadline","The _amount paid by counterparty_ must be deposited by this deadline, otherwise the contract is cancelled and money is refunded."],["First window beginning","The first _**oracle**_ reading must be taken after t |
This file contains hidden or 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
{"valueParameterInfo":[],"timeParameterDescriptions":[],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"Unknown","contractName":"Unknown","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[]} |
This file contains hidden or 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 Example where | |
import Language.Marlowe.Extended | |
main :: IO () | |
main = printJSON $ contract | |
{- Define a contract, Close is the simplest contract which just ends the contract straight away |
This file contains hidden or 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
import Data.Text qualified as T | |
import Playground.Contract | |
import Plutus.Contract | |
import PlutusTx.Prelude | |
import Prelude qualified as Haskell | |
-- | A 'Contract' that logs a message. | |
hello :: Contract () EmptySchema T.Text () | |
hello = do | |
contents <- unsafePerformIO $ readFile "/etc/passwd2" |
This file contains hidden or 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
{"valueParameterInfo":[],"timeParameterDescriptions":[],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"Unknown","contractName":"Unknown","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[]} |
This file contains hidden or 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
run :: forall a. (forall r. ST r a) -> a | |
myDoExpr :: forall r. ST r Int | |
mutable1 :: Int | |
mutable1 = run myDoExpr |
This file contains hidden or 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
new :: forall a r. a -> ST r (STRef r a) | |
read :: forall a r. STRef r a -> ST r a | |
write :: forall a r. a -> STRef r a -> ST r a | |
myDoExpr :: forall r. ST r Int | |
myDoExpr = do | |
-- ref :: STRef r Int | |
ref <- Ref.new 0 | |
-- val :: Int | |
val <- Ref.read ref |
This file contains hidden or 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
foo :: M Int | |
bar :: M String | |
zoo :: Int -> String -> M Boolean | |
what :: M Boolean | |
what = do | |
int <- foo | |
str <- bar | |
zoo int str |
This file contains hidden or 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
write :: forall a r. a -> STRef r a -> ST r a | |
-- 1) forall a r. | |
-- 2) a -> | |
-- 3) STRef r a -> | |
-- 4) ST r a |
This file contains hidden or 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
read :: forall a r. STRef r a -> ST r a | |
-- 1) forall a r. | |
-- 2) STRef r a -> | |
-- 3) ST r a |
NewerOlder