mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-19 16:57:40 +03:00
Interfaces accept at most a single ensure clause (#13093)
* Add test for multiple ensure declarations in interface * update ghc patch * Update expected result for daml-doc interface test changelog_begin changelog_end
This commit is contained in:
parent
5616846a7f
commit
7af4215261
@ -17,11 +17,11 @@ load("@os_info//:os_info.bzl", "is_linux", "is_windows")
|
||||
load("@dadew//:dadew.bzl", "dadew_tool_home")
|
||||
load("@rules_haskell//haskell:cabal.bzl", "stack_snapshot")
|
||||
|
||||
GHC_LIB_REV = "1afdcd3e82a547e00f72d6d9f9104f80"
|
||||
GHC_LIB_SHA256 = "537398692e0190c0b04e52f212021d253f9a1c3d1ae4985aff7a9b228e262efa"
|
||||
GHC_LIB_REV = "00c5083b2ce26066cad19364d6d0c1fe"
|
||||
GHC_LIB_SHA256 = "6d6a92aa0de6287f33a2947951a3dd6b448d85f866afb7ae42602d8264f3791e"
|
||||
GHC_LIB_VERSION = "8.8.1"
|
||||
GHC_LIB_PARSER_REV = "1afdcd3e82a547e00f72d6d9f9104f80"
|
||||
GHC_LIB_PARSER_SHA256 = "30a40ead99108d1f48418590d941282f4f51c07b6598f60f3d549d282d7b17db"
|
||||
GHC_LIB_PARSER_REV = "00c5083b2ce26066cad19364d6d0c1fe"
|
||||
GHC_LIB_PARSER_SHA256 = "515cddda730b39aa98809874105a1de967c8dcf482495df7b43c153394cd275d"
|
||||
GHC_LIB_PARSER_VERSION = "8.8.1"
|
||||
GHCIDE_REV = "0572146d4b792c6c67affe461e0bd07d49d9df72"
|
||||
GHCIDE_SHA256 = "7de56b15d08eab19d325a93c4f43d0ca3d634bb1a1fdc0d18fe4ab4a021cc697"
|
||||
|
@ -12,7 +12,7 @@ jobs:
|
||||
variables:
|
||||
ghc-lib-sha: '905f51296d979d79da511bed9ab2da7cb9429c9f'
|
||||
base-sha: '9c787d4d24f2b515934c8503ee2bbd7cfac4da20'
|
||||
patches: 'b4b47dce9d2324de5cb5d528867c61fb653dd3a1 833ca63be2ab14871874ccb6974921e8952802e9'
|
||||
patches: '1c14a526ce9143d59269c89f23bab2554fd513dc 833ca63be2ab14871874ccb6974921e8952802e9'
|
||||
flavor: 'da-ghc-8.8.1'
|
||||
steps:
|
||||
- checkout: self
|
||||
|
@ -64,26 +64,26 @@
|
||||
|
||||
## Functions
|
||||
|
||||
<a name="function-interface-noopimpl-41891"></a>[noopImpl](#function-interface-noopimpl-41891)
|
||||
<a name="function-interface-getowner-36980"></a>[getOwner](#function-interface-getowner-36980)
|
||||
|
||||
> : [Implements](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-interface-implements-92077) t [Token](#type-interface-token-10651) =\> t -\> () -\> [Update](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-update-68072) ()
|
||||
|
||||
<a name="function-interface-transferimpl-36342"></a>[transferImpl](#function-interface-transferimpl-36342)
|
||||
|
||||
> : [Implements](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-interface-implements-92077) t [Token](#type-interface-token-10651) =\> t -\> [Party](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-party-57932) -\> [Update](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-update-68072) ([ContractId](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-contractid-95282) [Token](#type-interface-token-10651))
|
||||
|
||||
<a name="function-interface-splitimpl-93694"></a>[splitImpl](#function-interface-splitimpl-93694)
|
||||
|
||||
> : [Implements](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-interface-implements-92077) t [Token](#type-interface-token-10651) =\> t -\> [Int](https://docs.daml.com/daml/stdlib/Prelude.html#type-ghc-types-int-37261) -\> [Update](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-update-68072) ([ContractId](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-contractid-95282) [Token](#type-interface-token-10651), [ContractId](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-contractid-95282) [Token](#type-interface-token-10651))
|
||||
|
||||
<a name="function-interface-setamount-37812"></a>[setAmount](#function-interface-setamount-37812)
|
||||
|
||||
> : [Implements](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-interface-implements-92077) t [Token](#type-interface-token-10651) =\> t -\> [Int](https://docs.daml.com/daml/stdlib/Prelude.html#type-ghc-types-int-37261) -\> [Token](#type-interface-token-10651)
|
||||
> : [Implements](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-interface-implements-92077) t [Token](#type-interface-token-10651) =\> t -\> [Party](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-party-57932)
|
||||
|
||||
<a name="function-interface-getamount-416"></a>[getAmount](#function-interface-getamount-416)
|
||||
|
||||
> : [Implements](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-interface-implements-92077) t [Token](#type-interface-token-10651) =\> t -\> [Int](https://docs.daml.com/daml/stdlib/Prelude.html#type-ghc-types-int-37261)
|
||||
|
||||
<a name="function-interface-getowner-36980"></a>[getOwner](#function-interface-getowner-36980)
|
||||
<a name="function-interface-setamount-37812"></a>[setAmount](#function-interface-setamount-37812)
|
||||
|
||||
> : [Implements](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-interface-implements-92077) t [Token](#type-interface-token-10651) =\> t -\> [Party](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-party-57932)
|
||||
> : [Implements](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-interface-implements-92077) t [Token](#type-interface-token-10651) =\> t -\> [Int](https://docs.daml.com/daml/stdlib/Prelude.html#type-ghc-types-int-37261) -\> [Token](#type-interface-token-10651)
|
||||
|
||||
<a name="function-interface-splitimpl-93694"></a>[splitImpl](#function-interface-splitimpl-93694)
|
||||
|
||||
> : [Implements](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-interface-implements-92077) t [Token](#type-interface-token-10651) =\> t -\> [Int](https://docs.daml.com/daml/stdlib/Prelude.html#type-ghc-types-int-37261) -\> [Update](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-update-68072) ([ContractId](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-contractid-95282) [Token](#type-interface-token-10651), [ContractId](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-contractid-95282) [Token](#type-interface-token-10651))
|
||||
|
||||
<a name="function-interface-transferimpl-36342"></a>[transferImpl](#function-interface-transferimpl-36342)
|
||||
|
||||
> : [Implements](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-interface-implements-92077) t [Token](#type-interface-token-10651) =\> t -\> [Party](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-party-57932) -\> [Update](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-update-68072) ([ContractId](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-contractid-95282) [Token](#type-interface-token-10651))
|
||||
|
||||
<a name="function-interface-noopimpl-41891"></a>[noopImpl](#function-interface-noopimpl-41891)
|
||||
|
||||
> : [Implements](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-interface-implements-92077) t [Token](#type-interface-token-10651) =\> t -\> () -\> [Update](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-update-68072) ()
|
||||
|
@ -112,32 +112,32 @@ Interfaces
|
||||
Functions
|
||||
^^^^^^^^^
|
||||
|
||||
.. _function-interface-noopimpl-41891:
|
||||
.. _function-interface-getowner-36980:
|
||||
|
||||
`noopImpl <function-interface-noopimpl-41891_>`_
|
||||
\: `Implements <https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-interface-implements-92077>`_ t `Token <type-interface-token-10651_>`_ \=\> t \-\> () \-\> `Update <https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-update-68072>`_ ()
|
||||
|
||||
.. _function-interface-transferimpl-36342:
|
||||
|
||||
`transferImpl <function-interface-transferimpl-36342_>`_
|
||||
\: `Implements <https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-interface-implements-92077>`_ t `Token <type-interface-token-10651_>`_ \=\> t \-\> `Party <https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-party-57932>`_ \-\> `Update <https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-update-68072>`_ (`ContractId <https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-contractid-95282>`_ `Token <type-interface-token-10651_>`_)
|
||||
|
||||
.. _function-interface-splitimpl-93694:
|
||||
|
||||
`splitImpl <function-interface-splitimpl-93694_>`_
|
||||
\: `Implements <https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-interface-implements-92077>`_ t `Token <type-interface-token-10651_>`_ \=\> t \-\> `Int <https://docs.daml.com/daml/stdlib/Prelude.html#type-ghc-types-int-37261>`_ \-\> `Update <https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-update-68072>`_ (`ContractId <https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-contractid-95282>`_ `Token <type-interface-token-10651_>`_, `ContractId <https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-contractid-95282>`_ `Token <type-interface-token-10651_>`_)
|
||||
|
||||
.. _function-interface-setamount-37812:
|
||||
|
||||
`setAmount <function-interface-setamount-37812_>`_
|
||||
\: `Implements <https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-interface-implements-92077>`_ t `Token <type-interface-token-10651_>`_ \=\> t \-\> `Int <https://docs.daml.com/daml/stdlib/Prelude.html#type-ghc-types-int-37261>`_ \-\> `Token <type-interface-token-10651_>`_
|
||||
`getOwner <function-interface-getowner-36980_>`_
|
||||
\: `Implements <https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-interface-implements-92077>`_ t `Token <type-interface-token-10651_>`_ \=\> t \-\> `Party <https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-party-57932>`_
|
||||
|
||||
.. _function-interface-getamount-416:
|
||||
|
||||
`getAmount <function-interface-getamount-416_>`_
|
||||
\: `Implements <https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-interface-implements-92077>`_ t `Token <type-interface-token-10651_>`_ \=\> t \-\> `Int <https://docs.daml.com/daml/stdlib/Prelude.html#type-ghc-types-int-37261>`_
|
||||
|
||||
.. _function-interface-getowner-36980:
|
||||
.. _function-interface-setamount-37812:
|
||||
|
||||
`getOwner <function-interface-getowner-36980_>`_
|
||||
\: `Implements <https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-interface-implements-92077>`_ t `Token <type-interface-token-10651_>`_ \=\> t \-\> `Party <https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-party-57932>`_
|
||||
`setAmount <function-interface-setamount-37812_>`_
|
||||
\: `Implements <https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-interface-implements-92077>`_ t `Token <type-interface-token-10651_>`_ \=\> t \-\> `Int <https://docs.daml.com/daml/stdlib/Prelude.html#type-ghc-types-int-37261>`_ \-\> `Token <type-interface-token-10651_>`_
|
||||
|
||||
.. _function-interface-splitimpl-93694:
|
||||
|
||||
`splitImpl <function-interface-splitimpl-93694_>`_
|
||||
\: `Implements <https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-interface-implements-92077>`_ t `Token <type-interface-token-10651_>`_ \=\> t \-\> `Int <https://docs.daml.com/daml/stdlib/Prelude.html#type-ghc-types-int-37261>`_ \-\> `Update <https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-update-68072>`_ (`ContractId <https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-contractid-95282>`_ `Token <type-interface-token-10651_>`_, `ContractId <https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-contractid-95282>`_ `Token <type-interface-token-10651_>`_)
|
||||
|
||||
.. _function-interface-transferimpl-36342:
|
||||
|
||||
`transferImpl <function-interface-transferimpl-36342_>`_
|
||||
\: `Implements <https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-interface-implements-92077>`_ t `Token <type-interface-token-10651_>`_ \=\> t \-\> `Party <https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-party-57932>`_ \-\> `Update <https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-update-68072>`_ (`ContractId <https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-contractid-95282>`_ `Token <type-interface-token-10651_>`_)
|
||||
|
||||
.. _function-interface-noopimpl-41891:
|
||||
|
||||
`noopImpl <function-interface-noopimpl-41891_>`_
|
||||
\: `Implements <https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-interface-implements-92077>`_ t `Token <type-interface-token-10651_>`_ \=\> t \-\> () \-\> `Update <https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-update-68072>`_ ()
|
||||
|
@ -0,0 +1,12 @@
|
||||
-- Copyright (c) 2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
||||
-- SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
-- @SINCE-LF-FEATURE DAML_INTERFACE
|
||||
|
||||
-- | Check that multiple ensure declarations trigger an error
|
||||
module InterfaceMultipleEnsure where
|
||||
|
||||
-- @ERROR range=12:5-12:18; Multiple 'ensure' declarations
|
||||
interface I where
|
||||
ensure True
|
||||
ensure 0 == 0
|
Loading…
Reference in New Issue
Block a user