For numeric, the superclass dicts can be of the for `dict @10` so only
handling variables doesn’t work. Now we walk down applications and
check the name on the left.
* Don't cache the GHC Core produced during compilation
In our experiments, this reduced the memory footprint by ca. 18% on a very
big code base.
* Adapt integration tests
* Fix integration tests
* Extend Priority type with Telemetry value
* Include Telemetry logging level in logger
* Log viewing of scenario results
* Update ghcide with telemetry logging level
* Add TemplateTypeRep to AnyContractId
* Define Trigger.ContractId t
* Use Trigger.ContractId t
* Implement fromCreated and fromArchived
* instance MapKey TemplateTypeRep
* More efficient ACS access using Map TemplateTypeRep
* ./fmt.sh
* toString and fromString for Identifier
* Replace Identifier by TemplateTypeRep
* TheContractId --> AbsoluteContractId
https://github.com/digital-asset/daml/pull/3245#discussion_r338033546
* language: dalf imports and a test
This adds the possibility to directly import dalfs in a project. We test
that we can import the `simple-dalf` in the daml-assistant integation
tests. For now we only check that data type generation works, not yet
the template instance.
The following was fixed: When rewriting package self references, this
changes the hash of the package later on and leads to different package
hashes. Also we need to be careful to write the orignal binary
representation to this and not re-encode it because the encoding might
have changed with a different sdk.
* addressing moritz's comments.
* windows doesnt like bazel paths
* language: fix: don't look for daml files in hidden directories
Fixes#3134. When locating daml source files, we need to make sure we're
not recursing into the .daml directory, because it contains source files
of the dependencies.
* Update daml-assistant/integration-tests/src/Main.hs
Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* 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
This moves the creation of a package database from given dalfs out of
the migrate command and into the init command. In particular, this makes
the process of creating a package database independent of the migrate
command.
It also changes the way this package database is created to be only
dependend on given dalf files.
* language: add internal command for generating source from dalf.
We add an internal command for generating DAML source code from .dalf
packages. Also adds an internal flag to tell the compiler, that it is
compiling generated source.
* Intern all strings and dotted names in the DAML-LF protobuf encoding
On one of our huge DAML code bases this has brought down the size of the
DALF by 60% and cut the memory usage during decoding by 50%.
The `@QUERY-LF` tests in the damlc integration tests check that the
interning actually works.
* Add scala decoder support for interned strings
* Memoize versionisOlderThan. Speeds up decoding by 6x.
* Properly fix the performance problem with version ordering
LanguageVersion.ordering was a `def` and not `val` causing us to
recreate the ordering tables every time.
* Clean up //daml-lf/archive:decode-test
* Use int32 for interning indices
* Adapt QUERY-LF tests
* Strip a few useless field_ prefixes
* Add test for uniqueness in interning tables
* Drop field_ prefix from jq queries
* Fix Scala encoder
* Fix bond-trading tests
* Rename decode-test to decode-tester
* Address @cocreature's comments
* daml-lf: proper versioning for reading internedStrings
* daml-lf repl: revert change
We're working on a feature to import plain DALFs without any attached
source or interface files into a DAML project. This PR provides a tool to
generate a simple DALF file for testing this feature.
* Remove polymorphic literals from library
* Add BECastNumeric and BEShiftNumeric in DAML-LF AST.
* Update rest
* Copyright header
* Remove polymorphic literals from LF conversion.
* Update tests
* Add test for forbidden polymorphic literals
* Add newline in DA.Numeric
* use MulNumeric instead of CastNumeric in DA.Internal.Prelude
After string interning we won't have direct access to string anymore but
rather need to go through the interning tables. This PR implements the
required infrastructure for that endeavour.
* Write JSON files in damlc integration test
There were quite a few occurences where I needed to look at the JSON
representation of the generated DALF in the past. Particularly, when
trying to come up with the `@QUERY-LF` pragmas for new tests.
This PR writes the JSON files to disk next to the (pretty printed)
DALF files.
* Remove useless rewriting of numbers into strings
* Upgrade ghc-libs
* Convert template instances as type synonyms to DAML-LF
* Look for TEMPLATE_INSTANCE suffix for daml docs
* Update desugaring documentation
The compiler rewrites constraints like `Template (Foo t) => ...` into
`FooInstance t => ...`. Unfortunately, this rewriting does not yet kick in
when the constraint contains superfluous parentheses as in
`(Template (Foo t)) => ...`.
This PR fixes the problem.
Fixes#2994.