Commit Graph

23 Commits

Author SHA1 Message Date
Neil Mitchell
bdcbf16462 #2326, GHC 8.4 compatibility (#2796)
* #2326, GHC 8.4 compatibility

* Fix up CI

* Add a Shake lower bound

* Upgrade to a hie-bios which is GHC 8.4 compatible

* Add a GHC 8.4 stack

* Fix HLint again
2019-09-07 16:23:14 +02:00
Robin Krom
2374b8c231
Migrate same package name (#2564)
* language: smoothing out the migration experience

Some improvements to make the migration process simpler when migrating
between packages with the same name, e.g. foo-1.0.0 -> foo-2.0.0. This
is the main use case.
2019-08-20 11:02:41 +02:00
nickchapman-da
b90862ebec
improve haskell module hierarchy to be more consistent (#2319) 2019-07-29 15:55:55 +01:00
Moritz Kiefer
ce5fe424fc
Speed up file modification checks (#2317)
Speed up file modification checks

Summary: `getModificationTime` from the `directory` package is really
slow. The `unix` package is faster but still slow. This PR brings the
time spent checking file modifications (which is required on every
change) from ~0.5s to ~0.15s.
2019-07-29 16:19:32 +02:00
nickchapman-da
b30228ab95
{-# LANGUAGE OverloadedStrings #-} is now on by default (#2270) 2019-07-24 08:09:26 +01:00
Moritz Kiefer
75ea177e87
Run exception handlers on SIGTERM in daml assistant (#2069) 2019-07-09 15:44:09 +02:00
Moritz Kiefer
13253d82d1
Turn the damlc module hierarchy into something a bit more sane (#2061)
This should hopefully be the last large reshuffling PR. I’ll write a
description of the new layout in the readme in a separate PR.
2019-07-09 15:10:40 +02:00
Neil Mitchell
8db9941858
Make hie-core outside an IDE work better (#1895)
* Move the hie-core demo files around (they aren't really a demo anymore)

* Split the command line parsing into a separate module

* Give messages about how long starting something takes

* Make the interactive mode say what it is doing a bit more

* Add a --cwd flag to hie-core

* Take a list of files and directories for hie-core

* Update the readme to say how to test using hie-core

* Fix up the bazel file

* Add HLint exception
2019-06-26 17:07:08 +01:00
Fran
6318b3f858
Handle SIGINT in daml commands. (#1807)
* Raise UserInterrupt whenever SIGTERM happens when spawning processes in daml-helper.

* Avoid redundant installSignalHandlers

* Copyright header

* Update lint rules.

* Move installSignalHandlers to main
2019-06-24 08:25:12 +01:00
Martin Huschenbett
e63b012d2d
Inline the EnumType and EnumCon types in Haskell's DAML-LF AST (#1822)
My primary goal is to avoid confusion when starting to support DAML-LF's
enum types. I also think these types were never particularly useful,
although I introduced them myself...
2019-06-22 12:01:56 +02:00
Neil Mitchell
8885160c7c Further cleanups to hie-core (#1819)
* Move the span related functionality to one place

* Fuse docHeaders away

* Decouple AtPoint from the rest of the rule database, simplifying the dependencies

* Move the import related functionality to one place

* Move all the closely tied to GHC modules together

* Rename the Logger module

* Push the other module renames through the code base

* Rename Development.IDE.State to Development.IDE.Core

* Rename Functions.Compile to Core.Compile

* Fix up some module names

* Cut down on non-sensicle exports

* Don't worry about setting source - no one uses it

* Reorder the module header

* Give more sensible names to the diagnostic creating functions

* Use more appropriate diagnostic functions

* Simplify the internal diagnostic creations

* Rewrite the diagnostics to go direct, not via GHC error types

* Remove redundant dflags from some functions

* Make sure the warning vs error distinction remains

* Remove unnecessary extensions
2019-06-22 09:21:59 +01:00
Neil Mitchell
39e27fb2e3 Clean up hie-core (#1815)
* Make atPoint generate either haskell or daml syntax, depending on options

* Get rid of data HoverText

* Move VirtualResource out from hie-core

* Rename hie-core to the right name

* Drop Types.LSP, merge it into LSP.Protocol

* Remove orphans that aren't actually used in our code

* Delete redundant newlines

* Add a defaultIdeOptions function

* Move ideTryIOException over to its one user

* Delete unused exports

* Delete the ProjectDiagnostic newtype - the type index was always Key

* Don't reexport position information from Diagnostic

* Delete the unused bits from Location

* Delete unused stuff from getSrcSpan

* Move URL stuff into Location from Diagnostic

* Remove unnecessary CPP

* Remove unnecessary extension

* Change from stage being polymorphic to being a Text

* Fix up the test suite too

* Push the cleanup to the edges

* More dependencies

* Patch up the tests now they need to find the type signature inside a ```daml block
2019-06-21 21:19:07 +00:00
Neil Mitchell
a33e6b8d69 Ban a bunch of unsafe or dodgy functions (#1534) 2019-06-05 14:02:10 -04:00
Moritz Kiefer
60cb8f5271 Switch Hover from MarkedString to MarkupContent (#1473)
MarkedString is deprecated in LSP (both the protocol itself and the
Haskell library) so we should move away from it.
2019-05-31 13:43:36 +00:00
Moritz Kiefer
df674c5569
Move DA.LanguageServer.Protocol to haskell-lsp-types (#1437)
There are still a few types left over that I will replace in separate PRs.
2019-05-28 20:45:29 +02:00
Neil Mitchell
abb8af60cf
IDE GHC 8.6 Compatibilty (#1148)
* Rename the #ifdef for GHC_STABLE

* More CPP required for GHC stable

* Add a compatibility wrapper for HIE functionality which is new in GHC HEAD

* HLint ignores

* Finish the dummy implementations

* Add a bazel build for the ide-core library against GHC
2019-05-15 11:21:21 +01:00
Neil Mitchell
68b0430284
GHC 8.6 compat for the IDE (#955)
* I have no idea now LPat and Pat previously managed to unify...

* Avoid using unRealSrcSpan as its only introduced for GHC 8.8

* Add some CPP to permit compiling with GHC 8.6

* Permit CPP in one more place
2019-05-06 21:29:22 +01: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
536b1ea87f Explicit export lists in the DAML-LF Haskell module (#813)
* Delete an entirely unused module

* Delete an entirely unused module

* Switch the compiler to use EUnit over mkEUnit

* Delete an unused module

* Whitespace only

* Clean up the API for World, don't expose the internals, better creation functions

* Clean up the type checker environment, don't expose the internals of Gamma, add a few helper functions

* Delete unused functions

* Explicit module export lists

* Fix the nub replacement hints

* Turn on the warning that we require module export lists

* Add an explicit export list
2019-05-02 10:12:31 +02:00
Martin Huschenbett
370b58d2fd
Turn on a few more hlint hints (#800) 2019-04-30 20:46:52 +02:00
Martin Huschenbett
d35e4a4f56
Remove a few ignore clauses from .hlint.yaml that are not needed anymore (#798)
The removed exceptions were necessary in the past but aren't anymore, mostly
since the files they refer to are gone.
2019-04-30 18:02:32 +02:00
Moritz Kiefer
f4b79c7518
Update path automatically on Windows in "daml install --activate" (#757) 2019-04-29 17:10:17 +02:00
Digital Asset GmbH
05e691f558 open-sourcing daml 2019-04-04 09:33:38 +01:00