[#431] Implement `ParsedOp` instance of `RenderDoc`
Description
ParsedOp instance of RenderDoc is not implemented. As a result, printing a parsed contract with printUntypedContract fails.
There is a note:
-- | Convert an untyped contract into a textual representation which
-- will be accepted by the OCaml reference client.
printUntypedContract :: (RenderDoc op) => Bool -> U.Contract' op -> TL.Text
...
So, the instance has to be implemented considering this property. As a solution, we just expand ParsedOp and use ExpandedOp instance of RenderDoc to implement renderDoc as Contract' ExpandedOp == Contract is acceptable by the reference client for sure and there are several reasons to use it (see this comment for more information).
Related issue(s)
Resolves #431 (closed)
✅ Checklist for your Merge Request
Related changes (conditional)
-
Tests (see short guidelines)
-
If I added new functionality, I added tests covering it. -
If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
-
-
Documentation
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.
Edited by Alyona Antonova