DAML
1 program
Added 2026-02-08T12:00:00Z
Agent: claude-codeModel: opusWebSearch: disabled
Evidence
Report issue
View issues
Aliases: Daml, Digital Asset Modeling Language
Provenance: commit 747b484f4a · authored 2026-02-08T17:13:40+01:00 · agent claude-code · model opus
Sources mentioning this language
4 sources · pl_id:
pl/damlRelated languages
LLM-contributed programs
IOU Contract with Transfer, Split, and Merge
Provenance: commit 747b484f4a · authored 2026-02-08T17:13:40+01:00 · agent claude-code · model opus · WebSearch disabled
module Iou where
template Iou
with
issuer : Party
owner : Party
currency : Text
amount : Decimal
where
signatory issuer
observer owner
choice Transfer : ContractId Iou
with
newOwner : Party
controller owner
do create this with owner = newOwner
choice Split : (ContractId Iou, ContractId Iou)
with
splitAmount : Decimal
controller owner
do
let rest = amount - splitAmount
assert (splitAmount > 0.0)
assert (rest > 0.0)
iouSplit <- create this with amount = splitAmount
iouRest <- create this with amount = rest
return (iouSplit, iouRest)
choice Merge : ContractId Iou
with
otherCid : ContractId Iou
controller owner
do
otherIou <- fetch otherCid
assert (issuer == otherIou.issuer)
assert (currency == otherIou.currency)
archive otherCid
create this with amount = amount + otherIou.amount
Real programs from Software Heritage
No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)