* Include type synonyms in LF abstract syntax
* Use T instead of S for synonyms
Following a suggestion from @remyhaemmerle-da, we avoid having to
adapt all rules to synonyms by simply reusing the definition of type
constructors.
* Add specification for type synonyms in DAML-LF
* Fix identifiers for type synonyms
* Use S for type synonyms
* Address review comments
* Split up TyTypeSynonym and DefTypeSynonym
* daml-lf: rename Map to TextMap in archive proto
+ in Scala/haskell AST
* a bit more renamming
* Update compiler/daml-lf-tools/src/DA/Daml/LF/TypeChecker/Serializability.hs
Co-Authored-By: associahedron <231829+associahedron@users.noreply.github.com>
* fix test
* Apply suggestions from code review
Co-Authored-By: associahedron <231829+associahedron@users.noreply.github.com>
* Update compiler/daml-lf-ast/src/DA/Daml/LF/Ast/Base.hs
Co-Authored-By: associahedron <231829+associahedron@users.noreply.github.com>
* Add GenMap to DAML-LF 1.dev
* Update LF spec
* remove type constraints again
* Revert "remove type constraints again"
This reverts commit 2081e5b8ef.
* Fix a messed up merge
* Generalize AnyTemplate type to Any in DAML-LF
See #3131 for the motivation for this. The tl;dr is that we need
something like AnyTemplate for choice types as well.
Since the protobuf was already more general in anticipation of such a
change, this change only changes the internal AST on the Haskell and
Scala side.
Since AnyTemplate change has never made it out of 1.dev, I updated the
changelog in the LF spec instead of adding a new entry.
* Update daml-lf/spec/daml-lf-1.rst
Co-Authored-By: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>
* windows debugging
* more windows debugging
* clean expunge
* don’t cat the config file
* remove comment on type equality
* windows …
* gnah
* foobar
* foobar
* does anything ever work?
* reenable caching
* Do not build daml-lf-ast separately
* engine: create persisted value for numeric
* engine: update info test
* Apply suggestions from code review
Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com>
* engine: weaken scale constraints when transalting value
* Address Stephen's comments
* Address one of Stefano's comments
* daml-lf: fix transaction test
* Add Any type and to_any/from_any primitives to protobuf
Following a suggestion by Rémy, the protobuf representation is more
general and is associated with an arbitrary type instead of a
typecon. This allows us to easily extend this later to a full Any
type.
I’ve still called the type in the protobuf Any instead of Haskell’s
Dynamic since I find AnyTemplate more clear than DynamicTemplate and
having AnyTemplate and Dynamic seems confusing.
Right now, the decoder enforces that the type is a TypeCon.
* Fix some mistakes in the spec
* Update daml-lf/spec/daml-lf-1.rst
Co-Authored-By: Remy <remy.haemmerle@daml.com>
* Update daml-lf/spec/daml-lf-1.rst
Co-Authored-By: Remy <remy.haemmerle@daml.com>
* Update daml-lf/spec/daml-lf-1.rst
Co-Authored-By: Remy <remy.haemmerle@daml.com>
* Update daml-lf/spec/daml-lf-1.rst
Co-Authored-By: Remy <remy.haemmerle@daml.com>
* Add evaluation rule for to_any_template
* Update daml-lf/spec/daml-lf-1.rst
Co-Authored-By: Remy <remy.haemmerle@daml.com>
* daml-lf: add CAST_NUMERIC and SHIFT_NUMERIC internally
* daml-lf: add CAST_NUMERIC and SHIFT_NUMERIC to archive proto
* daml-lf: update spec with CAST_NUMERIC and SHIFT_NUMERIC
* update release notes
* fix spec
* Address comments from Fran and Gerolf
* fix unrel
* daml-lf: prepare archive proto for Numeric
* replace DECIMAL by NUMERIC in messages and fields
* add nat kind and nat type
* add builtins CAST_NUMERIC and SHIFT_NUMERIC
* daml-lf: remove new builtins from archive proto
* daml-lf: some more doc about numeric
* daml-lf: fix spec
* check that submitter is in maintainers when looking up keys
Fixes#1866. Note that this limitation applies both for `lookupByKey`
and `fetchByKey` -- anything involving retrieving a key is affected.
* add UNTIL-LF to run tests up to a certain version of DAML-LF
* name targets for DAML tests better
* add notes about DAML-LF changes
* commit Test.daml with DAML-LF 1.5 rather than compiling it on the fly
* add scenario tests for #1866
* add warnings about future key behavior in docs
* use flag rather than version when executing
* Introduce contract key to exercise node
Track the contract key in NodeExercises. This is in
preparation for adding the key into exercise events, and
for support for contract keys in kvutils, where we need
to be able to compute the outputs of the submission, e.g.
the contract key that would be unset by a consuming exercise.
This introduces transaction version 8.
* Move release note on contract keys in exercises to unreleased.rst
* Address Stephen's review
- Drop changelog entry for this change as it is not user facing
- Add info on version 8 to transaction.rst. Fix typo in version 7.
- Reorder VersionTimeline as per review
- Only compare the NodeExercise 'key' if it is set in the original
transaction (in order to compare transactions in a backwards
compatible manner)
* Unbork unreleased.rst
* specify the new fields for interning package IDs
* percolating intern tables
* crawl packages for package IDs as a pre-phase: generic prep
* stub case for interned_id in Scala packageref reader
* HasPackageRefs instances for the rest of the ast
* make intern table and use when encoding PackageRefs in v1
* don't need where
* stub out decode for interned package IDs
* no benefit to using uint32 instead of uint64
* percolate in encode one step
* interned case for decoding PackageRefs
* naming details
* intern table decoder
* finish propagating the intern table in encoder
* encode the package ID table
* document the vital assumption of encodeInternedPackageIds
* propagate the intern table through the LF decoder
- done by stacking ReaderT on top of Decode internally,
as discussed with @hurryabit
* daml-lf-proto requires mtl
* stub out interned case in Scala LF decoder
* stub interface decoder function
* get the interned table to most places in InterfaceReader
* support for interned package IDs in Scala decoder
* use ImmArraySeq instead of Vector for Scala intern decode table
* adding that ghc extension didn't make sense
* implement interned ID decoding for InterfaceReader
* scenario service won't have interned package IDs
* test the interned ID resolution in Scala by examining the proto -> AST in detail
* proper precondition for the dev phase of interned IDs testing
* better error reporting for malformed DALFs in intern test
* just import Data.Int
- suggested by @neil-da; thanks
* pass around the lookup function instead of the vector in decoder
- suggested by @neil-da; thanks
* remove derivations for types deleted in e63b012d2d
* rename VersionAware to EncodeCtx
- suggested by @hurryabit; thanks
* rename MDecode to MonadDecode
- suggested by @hurryabit; thanks
* pass a function through the encoder instead of a set
- based on suggestions by @hurryabit and @neil-da; thanks
* daml-ghc test that interned IDs are generated
- suggested by @hurryabit; thanks
* adapt to 5b480c99ec#1844
* Freeze DAML-LF 1.dev into DAML-LF 1.5
In other words, we release DAML-LF 1.5.
This is required for generic templates (#1387).
* description of FROM_TEXT_INT64 & FROM_TEXT_DECIMAL
* amend version history
add ``FROM_TEXT_INT64`` and ``FROM_TEXT_DECIMAL`` in the specification changelog
* typos
* Fix markup in DAML-LF spec
* Add release notes
* Drop support for DAML-LF 1.1 from damlc
Part of #853.
* Fix docs test
* Add show party test back
* Update release notes
* Remove target version from Java codegen test