* Support depending on potentially stale values in damlc
For now, this is opt-in and only enabled for the scenario service.
Locations should be properly mapped so if lines are inserted above a
scenario, the scenario link will move down.
* Erase key lookup methods implemented using magic as well
We're already erasing `create`, `fetch` and `exercise` methods. I've
missed the ones related to key lookups when I did that. This PR fixes
my mishap.
* Fix typo in docs.
Co-Authored-By: Rohan Jacob-Rao <rohanjr@gmail.com>
We want to discourage users to pin down a target DAML-LF version but rather
want them to always use the default version, which is typically the newest
version. Thus, we turn this into an expert flag that is mostly used for
testing by us.
The module was only used to format decimal numbers. The only impact the
formatting could have had was to add/strip trailing zeros from the
presentation of the number. However, manual testing shows this did not
happen. Thus, the whole module is now useless.
`template X` generates type class `XInstance` which contains a few methods
which are implemented in terms of `magic` and then rewritten during the
conversion to DAML-LF. The default implementations of these methods need to
be erase during the conversion to DAML-LF since `magic` is erased as well.
* language: added a merge command to damlc
This adds a 'merge-dars' command to damlc to merge two dars into one.
This is useful when you created an upgrade dar and want to ship it as
part of the latest version of a package.
* added a comment on nubSort for clarity
* hie-core/test: Dedicated test suite for hie-core
* Apply hlint suggestion
Use System.Environment.Blank's setEnv which has a non-overwrite mode
that implements precisely what we were doing with more code before.
* buildifier fixes
* hie-core-exe works on Windows now - ghc-paths was fixed
This is a refactoring-only PR in preparation for supporting stale
values in damlc so we can still produce some results if a rule fails
to produce a value but has a stale value stored.
While experimenting with the pure Haskell gRPC implementation I
noticed that there is a fair amount of duplication in PrettyScenario
so this PR cleans up some of that.
The gRPC library does not handle asynchronous exceptions properly and
ends up leaking things which causes various issues (segfaults,
assertion failures, weird backup poller timer messages, …) when
shutting down gRPC.
The switch to grpcShutdownBlocking is somewhat unrelated (the issues
happen with and without that and the fix seems to work both times) but
that function seems to be the right way to shut down gRPC in newer
versions and is what all the official language bindings switched to,
so I also made the switch.
I haven’t yet looked into the issues in the HS ledger bindings so not
sure if this helps with those as well.
* language: upgrades independent of stdlib
This fixes several issues in the code generation from dalfs. As a result
we can now generate upgrades independent of the stdlib source.
Some `Development.IDE.*` modules were imported qualified as either `Compile`
or `CompilerService`. These names are at least odd and maybe also
misleading. Since there's no actual need to import them qualified, let's
just import them not qualified.
* handling dalfs flowing to next line
* space not blank
* Lints and space
* fixing the test names
* filter using not.null
* Using fold instead. makes reading easy
* Format everything
* Removing use of partial function
* More stdlib tweaks
* Another commit to kick off build again
* Fix incorrect docs syntax
* Apply suggestions from code review
Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
* Apply suggestions from code review
Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
* More suggestions applied
* Support reading of DAML-LF 1.5 in damlc again
We dropped support for this for no good reason when we dropped support for
writing DAML-LF 1.5. Being able to _read_ older versions of DAML-LF is
important for the upgrading story.
We don't support reading older versions of DAML-LF since there seems to
be no need for this.
* Fix integration test
* DA.Bazel.Runfiles based on bazel-runfiles
* locateRunfilesMb -> locateRunfiles
* .exe extension on Windows
* Add docstring to locateRunfiles
* bazel-runfiles: Normalize on Windows
* language: correct translation of sums of products in daml code gen
We fix the translation of data type constructors with several name
components for sums of products in the translation from daml-lf back to
source.
There is lots of room for improvements here but I think this is a good
first step. The 3 main things that could be improved imho are:
- Rewrite source locations to point to the original file rather than
the generated module
- Provide some way to declare things like imports or more general,
setup code that is added to the generated module.
- Prettier/more helpful output during a run, e.g., print the list of
successful tests.
* internal name
* Adding internal choice name
* correct but ugly
* no more awkard underscore for create and archive
* not more underscores
* creating archive is not necessary
* simplify
* Removing duplicate
* simplified code
* Using cons intead of ++
* not needed parans
* Formatting
* Use type information in function docs
* idpToText -> packRdrName
* Use tycon to get superclasses
* Make anchors from tycons
* Generate all type anchors with tyConAnchor
* Type information is everywhere
* Render links.
* s/missing/available/
* Update golden tests
* Hlint / refactor
* Clean up import list
* Banish evil
* Catch lint
* Use mapMaybe
* Use list comprehensions instead
* packModule -> getModulename, dc_mod -> dc_modname
* Deal with tuple constructors properly
* Update the test case
* Better docs in Rst renderer
* Add test that uses type sig links
* Update release notes