forked from digital-asset/daml
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support generic templates (digital-asset#2465)
* Upgrade ghc-libs supporting generic templates * Update Proposal and ComposedKey tests to generic template syntax * Temporarily patch daml-doc test output (will need to fix for template instances)
- Loading branch information
Showing
11 changed files
with
72 additions
and
199 deletions.
There are no files selected for viewing
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
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
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
4 changes: 2 additions & 2 deletions
4
...s/daml-test-files/ProposalDSL.EXPECTED.md → ...ests/daml-test-files/Proposal.EXPECTED.md
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
10 changes: 5 additions & 5 deletions
10
.../daml-test-files/ProposalDSL.EXPECTED.rst → ...sts/daml-test-files/Proposal.EXPECTED.rst
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
-- Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. | ||
-- SPDX-License-Identifier: Apache-2.0 | ||
|
||
-- A generic proposal workflow using generic templates. This is not tested | ||
-- itself but imported in the `ProposalIou` test. | ||
-- @SINCE-LF 1.5 | ||
daml 1.2 | ||
module Proposal where | ||
|
||
import DA.List | ||
import DA.Text | ||
|
||
template Template t => Proposal t | ||
with | ||
asset : t | ||
receivers : [Party] | ||
name : Text | ||
where | ||
signatory (signatory asset \\ receivers) | ||
observer receivers | ||
agreement implode | ||
[ "Proposal:\n" | ||
, "* proposers: " <> show (signatory this) <> "\n" | ||
, "* receivers: " <> show receivers <> "\n" | ||
, "* agreement: " <> agreement asset | ||
] | ||
|
||
key (signatory this, name) : ([Party], Text) | ||
maintainer (fst key) | ||
|
||
controller receivers can | ||
Accept : ContractId t | ||
do create asset |
This file was deleted.
Oops, something went wrong.
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
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
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
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