daml/daml-lf/tests/InterfaceViews.daml
Gary Verhaegen 151e12b81a
bump copyright (#16002)
This is the result of:

- Updating `./COPY` to say `2023`.
- Running `./dev-env/bin/dade-copyright-headers update .`
2023-01-04 18:21:15 +01:00

50 lines
777 B
Haskell

-- Copyright (c) 2023 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
-- SPDX-License-Identifier: Apache-2.0
module InterfaceViews where
data View = View with
a : Int
b : Bool
interface I where
viewtype View
template T1
with
p : Party
a : Int
where
signatory p
interface instance I for T1 where
view = View with
a
b = True
template T2
with
p : Party
a : Int
where
signatory p
interface instance I for T2 where
view = View with
a
b = False
template T3
with
p : Party
a : Int
where
signatory p
interface instance I for T3 where
view = error "view crashed"
template T4
with
p : Party
a : Int
where
signatory p