Skip to content
Discussions/App Development/DAML-LF specForum ↗

DAML-LF spec

App Development5 posts586 views1 likesLast activity Jul 2020
OG
oggyOP
Jun 2020

There’s a spec for DAML-LF that includes the syntax, the typing rules, and the semantics of the LF language here:

github.com

digital-asset/daml/blob/8ee7de78ef47df8cbeee9e2725cb36a44ca3fa8f/daml-lf/spec/daml-lf-1.rst

.. Copyright (c) 2020 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
.. SPDX-License-Identifier: Apache-2.0

Copyright © 2020, `Digital Asset (Switzerland) GmbH
<https://www.digitalasset.com/>`_ and/or its affiliates.  All rights
reserved.

DAML-LF 1 specification
=======================

.. contents:: Contents


Introduction
^^^^^^^^^^^^

This document specifies version 1 of the DAML-LF language — the
language that DAML ledgers execute. DAML compiles to DAML-LF which
executes on DAML ledgers, similar to how Java compiles to JVM byte
code which executes on the JVM. “LF” in DAML-LF stands for “Ledger
This file has been truncated. show original

It appears quite well maintained, but it’s not included in the SDK docs. Is it because it’s deemed too technical?

SH
Shaul
Jun 2020

It’s not so much that it’s too technical, rather that it caters to a different audience than the SDK docs.

The SDK docs are mainly oriented towards a user of the DAML SDK, whereas most users will not need to read the LF spec in order to build a DAML app.

OG
oggy
Jun 2020

Absolutely, for most users the language reference docs and, to a lesser extent, the link to the ledger model should be more than enough. Not including it in the docs makes it hard to discover for the handful of people who might need it, though.

SO
Sofia_Faro
Jul 2020

Perhaps we should add a link to the DAML LF spec from the docs. Maybe from this page, since it already gets a bit technical about how DAML maps to DAML-LF: https://docs.daml.com/app-dev/daml-lf-translation.html

What do you think?

OG
oggy
Jul 2020

I agree it’s on the appropriate “technical” level, but it feels a bit odd to stuff this under the headline of “How DAML types are translated to LF”. How about here:
https://docs.daml.com/app-dev/ledger-api.html#daml-lf-intro
and here:
https://docs.daml.com/concepts/ledger-model/ledger-daml.html
?

← Back to Discussions