2

I investigated some Code examples, in haskell for Marlowe smart-contract, and used the "cabal repl" with the " :i " command, like this:

*Main> :i ValueEQ type Observation :: * data Observation = ... | ValueEQ Value Value | ... -- Defined in ‘Language.Marlowe.Extended’

But I could not find the target library ‘Language.Marlowe.Extended’.

Is there a place where we can find the Haskell libraries for Marlowe? There's perhaps also a haddock, like in Plutus, for Marlowe?

3 Answers 3

2

With some research, the Haskell libraries for Marlowe seems to be here precisely.

2

Here are instructions for accessing Marlowe types and functions from ghci.

1
  • Thank you very much, Brian, It will be very very helpful. By the way, your lecture on the Cli was really great too! Commented Jul 17, 2022 at 17:50
1

What you are looking for is the repo where the Marlowe lang is implemented, more specifically the data constructor that you show is defined in the Observation data type:

data Observation = AndObs Observation Observation
                 | OrObs Observation Observation
                 | NotObs Observation
                 | ChoseSomething S.ChoiceId
                 | ValueGE Value Value
                 | ValueGT Value Value
                 | ValueLT Value Value
                 | ValueLE Value Value
                 | ValueEQ Value Value
                 | TrueObs
                 | FalseObs
  deriving stock (Show,Generic)
  deriving anyclass (Pretty)

Which is found in Language.Marlowe.Extended. So you can directly refer to the repo where the Haskell libraries are defined.

4
  • Yes, with your links and some research, the Marlowe libraries seems to be here. Thanks Igodlab. I don't know if it's the same version as in the Marlowe Playground, yet. Commented Jun 20, 2022 at 21:55
  • You can look at the git rev in your cabal.project file to know what commit snapshot the Marlowe Playground uses. Glad it helped! If you upvote and mark my answer as solved it will help other people find it ;)
    – Igodlab
    Commented Jun 21, 2022 at 21:31
  • You need at least 15 reputations to cast a vote, So I can't. Commented Jun 26, 2022 at 16:18
  • I have upvote your answer, which helped me in part, and put one with a bit more of precision, now that my reputation has grown, Igodlab. Commented Jul 1, 2022 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.