Commit Graph

77 Commits

Author SHA1 Message Date
Martin Huschenbett
6e73868220 Replace all occurrences of Tagged in DAML-LF AST with newtypes (#1289)
* Replace all occurrences of Tagged in DAML-LF AST with newtypes

This must end as it makes the code bases harder to understand without
adding any benefits.

* Add two more usages of mkVal

* Remove Orphans.Lib_hashable

* Remove tagged from package dependencies

* Derive stock classes as such
2019-05-21 16:19:57 +00:00
Moritz Kiefer
7afc8af554
Add --open-browser flag to daml start (#1176)
I went with the yes/no/auto approach we already use in the assistant
and moved the logic for that to da-hs-base.
2019-05-16 10:28:49 +02:00
Moritz Kiefer
41968cb4f7 Fix filename of Data.Conduit.Tar.Extra (#1143)
Somehow, I managed to accidentally use the weird . syntax in the
filename instead of moving it to the proper location.
2019-05-15 09:40:55 +01:00
Moritz Kiefer
ad10f98020
Fix SDK integration tests on Windows (#1125)
* Fix SDK integration tests on Windows

* Switch to Haskell-based tar extraction
2019-05-14 21:55:45 +02:00
Moritz Kiefer
218bd691f2 Fail if modules listed in exposed-modules are not in the DALF (#1054)
fixes #1041
2019-05-10 02:37:27 +00:00
Michał Majcherski
784fc1b8dd
windows: adds Bazel's MANIFEST file lookup to DA.Bazel.Runfiles (#801) 2019-05-08 13:17:36 +02:00
A. F. Mota
2d2159cd0a Fix getDispatchEnv / getDamlEnv re-entrancy. (#951)
* Add two failing getDispatchEnv tests.

* Fix getDispatchEnv idempotency.

* Fix new test formatting.

* Make getDamlAssistantPath look in env first.

* Fix daml env var overriding.

* Test all the Nothing cases of env var dispatching.

* Fix dispatchEnv and getDamlEnv for Nothings.

* Add hlint rule to avoid future setEnv debacles.

* Fix other uses of setEnv.

* Fix type error.

* Fix reviewer comments

* setEnv comment
2019-05-06 19:25:30 +00:00
Neil Mitchell
11b1d1deb9
Use less da-base (#919)
* Delete Test.Tasty.HUnit.Extended - no one was using the extended pieces

* Delete stuff from TH.Extended that was unused

* Delete stuff from Control.Monad.Except.Extended and simplify

* Delete unused stuff from Data.Text.Extended

* Inline the one use of runDefaultExceptT

* Delete Control.Monad.Except.Extended

* Clean up getAssociatedVirtualResources by inlining and thinking

* Fix dumb typos in getVirtualResources

* Remove usages of Control.Monad.Except.Extended

* Add a missing package import
2019-05-05 21:48:37 +01:00
Neil Mitchell
fe3e5c9639
Delete DA.Prelude (#914)
* Use DA.Prelude a lot less

* Make LANGUAGE pragmas have the right case

* Don't reexport DA.Prelude

* Remove more DA.Prelude imports

* Remove the nastiest renaming DA.Prelude

* Final removal of DA.Prelude

* Kill DA.Prelude

* Add missing dependencies

* More missing package imports

* More missing package imports

* Update compiler/daml-lf-ast/src/DA/Daml/LF/Ast/Base.hs

* Update compiler/daml-lf-ast/src/DA/Daml/LF/Ast/Base.hs
2019-05-04 18:51:56 +01:00
Neil Mitchell
3cab59ad6d Remove completely redundant imports of DA.Prelude (#911)
* Remove completely redundant imports of DA.Prelude

* Start chipping away at some NoImplicitPrelude too
2019-05-04 12:40:07 +00:00
Neil Mitchell
f256ef09c4 Delete modules that appear entirely unused (#909) 2019-05-04 11:54:27 +00:00
Neil Mitchell
4040dffc7a
Start cleaning up pretty-print (#821)
* Move from prettyDiagnostic to prettyDiagnostics

* Remove as much pretty print stuff as we can

* Try moving duplicate named functions with similar semantics and identical types to different names

* Change to returning pretty printed outputs from Diagnostics

* Remove a redundant import
2019-05-01 19:06:00 +01:00
Neil Mitchell
5ed95bc64c
Move DA.Pretty into da-hs-base (#818)
* Move DA.Pretty into da-hs-base

* Bazel formatting

* Remove another instance of da-hs-pretty
2019-05-01 14:50:19 +01:00
Neil Mitchell
1b146a273b
Delete unused Haskell modules (#817) 2019-05-01 13:58:22 +01:00
DavidM-D
8da835489f New diagnostics implementation (#737)
* Switch to haskell-lsp

* Fix build of data-default on Windows

* Use ghc environment files to avoid overflowing CLI length limits
2019-04-30 22:51:53 +02:00
Neil Mitchell
836d65e0ba
Add explicit export list (#806)
* Add explicit export lists in some places

* Add another explicit export
2019-04-30 21:08:36 +01:00
Neil Mitchell
d75b716bb7 Kill data loc (#804)
* Remove most of Data.Loc

* Kill more of Data.Loc

* Inline Data.Loc in the one place it is used
2019-04-30 17:21:06 +00:00
Martin Huschenbett
7f3556266c
Remove orphans instances for Binary and FromJSON/ToJSON (#723) 2019-04-26 13:25:42 +02:00
Martin Huschenbett
fffd8d03e8 Stop using Template Haskell to derive type class instances (#262)
* Stop using Template Haskell to derive type class instances

Template Haskell is notorious for causing slow build times. That's why we
remove the `makeInstances*` family of functions and use proper `deriving`
clauses instead.

* Make hlint happy

* Make hlint even more happy

* Derive Data

* Remove ToJSON instances from DAML-LF AST
2019-04-25 16:35:35 +02:00
Martin Huschenbett
e54ec705b5
Stop deriving ToJSON/FromJSON when using makeInstances (#695)
This is mostly a preparation for dropping `makeInstances` entirely.

As a side effect we have to change how we test properties of the DAML-LF
generated by damlc. Previously, we turned the AST into JSON using its
`ToJSON` instances. Now, we turn the AST into JSON using the `ToJSONPB`
instances generated by `proto3-suite`. The resulting JSON is then
inspected using the `jq` tool in both cases. This change actually improves
our testing since we're now testing properties of the generated protobuf
encoding of the AST rather than of our pleasant Haskell representation of
the AST.
2019-04-25 15:38:41 +02:00
Moritz Kiefer
1cc0126395 Disable echo in daml wrapper script (#655)
When echo is enabled (which is the default), the IDE can get really
confused since it tries to interpret the commands as LSP messages
which obviously fails.
2019-04-24 19:00:21 +00:00
gleber
aa70c7f64e
Enforce consistent formatting of BUILD files. (#412)
* Add buildifier targets.

The tool allows to check and format BUILD files in the repo.

To check if files are well formatted, run:

    bazel run //:buildifier

To fix badly-formatted files run:

    bazel run //:buildifier-fix

* Cleanup dade-copyright-headers formatting.

* Fix dade-copyright-headers on files with just the copyright.

* Run buildifier automatically on CI via 'fmt.sh'.

* Reformat all BUILD files with buildifier.

Excludes autogenerated Bazel files.
2019-04-12 13:10:16 +02:00
david-md-da
e165f1df00
Tag errors as errors rather than debug messages (#360) 2019-04-10 17:49:43 +02:00
david-md-da
159b0bca4d
Added tracking of telemetry opt-out (#357) 2019-04-10 17:45:17 +02:00
Brian Healey
4d7f455168
HOTFIX rename COPYRIGHT so github correctly shows apache2 license for repo (#274) 2019-04-05 22:10:47 -04:00
moritzkiefer-da
fd156c33df
Add daml start (#254)
* Add daml start
2019-04-05 19:34:23 +02:00
Digital Asset GmbH
05e691f558 open-sourcing daml 2019-04-04 09:33:38 +01:00