Commit Graph

286 Commits

Author SHA1 Message Date
wz1000
191bda61fe
9.6 support for HLS (#3480)
* 9.6 support

Fixes

hls-refactor-plugin 9.6 support

hls-gadt-plugin

Fix 9.4 build

Fixes

hls-gadt-plugin fixes

WIP 9.6 patches

fixes

fixes

fixes

fixes

fixes

Fixes and add CI

CI

CI fixes

patch haskell/actions for https://github.com/haskell/ghcup-hs/issues/783

CI fixes

CI fixes

CI fixes

CI

CI

CI

CI

CI

Fix build on 9.0

Fix build on 9.0

hls-splice-plugin 9.6 compat

fixes

fixes

fixes

fixes

Fix benchmark build errors

9.2.5 and 8.10.7 had build errors when running benchmarks due to `mfsolve`
test suite having duplicate instances, so stop building tests for
mfsolve (see: https://github.com/kuribas/mfsolve/issues/8). Also,
`http2-4.0.0` has a parse error due to a misplaced haddock comment that
causes build failure with `-haddock`. It is fixed in the latest commit
of the source repo, so use that in the `cabal.project` for now.

Checkout correct commit on `pull_request` in CI

By default, the `pull_request` event has a `GITHUB_SHA` env variable set to the
"last merge commit on the GITHUB_REF branch"
(see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request).
But we want to check out the latest commit on the branch whether or not it is a
merge commit. This commit changes the CI actions to do just that.

fixes

Use head.hackage for 9.4

Only use head.hackage for 9.5 and up

Reverts the change that caused head.hackage to be used for 9.4 as
well

Reintroduce source-repo-package for ekg-json

Fix refactor plugin tests

Fix missing constraint detection in refactor plugin

ghc 9.6+ allow newer unordered-containers:template-haskell

Some refactor tests no longer broken for 9.2

Fix simple-multi-test on 9.6

Mark simple-plugin as broken on 9.6

func-test fixes

Disable unsupported plugins on 9.6

Eval plugin fixes

Eval plugin test fixes, debug output in CI script

Restore 'working' setup/actions

WIP Fix GHC prerelease windows install

Fix eval plugin T11

fixes

Eval plugin fixes

Fix splice plugin test

Mark `simple plugin` ghcide test broken on 9.6

fixes

fixes

Use GHC 9.6-rc1 in CI

Try using 9.6.1 for CI

* 9.6 nix

* Remove head.hackage

* fixes

* fixes

* fixes

* fixes

* fixes

* fixes
2023-03-22 13:56:51 +00:00
fendor
014c8f9024
Remove hslogger from codebase (#3526)
Co-authored-by: Fendor <walross.power@gmail.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2023-03-18 14:46:00 +00:00
Matthew Pickering
f63627fa81 Simplify implementation of eval plugin and make it work with GHC 9.4
The plugin was implemented by calling "load" which circumvents all of
HLSs caching mechanisms for interface files and linkables. Instead we
should work like the other typechecking functions which get all the
stuff we need using HLS rules and setup the HscEnv with all the state in
the right places.

The key part to this is setting up all the HPT modules with linkables if
they are depenedencies of the module we are trying to run a function
from.

- ban load functions from GHC driver

- Enable CI for hls-eval-plugin and fix a bug due to clearing of mi_globals
2023-02-22 06:33:22 +05:30
Julian Ospald
a73c07c51b
Bump versions and add changelogs for 1.9.1.0 (#3493)
* Bump versions and add changelogs for 1.9.1.0

* Fix build on windows by disabling ghc-check pkg ABI check

---------

Co-authored-by: Zubin Duggal <zubin.duggal@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-02-14 19:48:11 +00:00
Michael Peyton Jones
ddc67b2d4d
Support stylish-haskell and ormolu in 9.4 (#3446)
* Update index-state

* Enable ormolu on 9.4

* Enable stylish-haskell on 9.4

* Update flake.lock

* Declare 9.4 to be fully supported

* Enable floskell for 9.4
2023-01-09 21:08:08 +00:00
Michael Peyton Jones
05051866b2
Delete the Brittany plugin (#3441)
It's unmaintained and not popular.

Fixes #3346.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-01-06 13:36:42 +00:00
wz1000
05b248dfac
Bump hls-call-hierarchy-plugin (#3427) (#3440) 2023-01-05 09:53:49 +00:00
wz1000
472947cdb9
Add 9.4.4 binaries and drop 9.4.2 (#3417) 2022-12-27 14:54:41 +00:00
Zubin Duggal
2df68246f8 Prepare release 1.9.0.0 2022-12-26 16:09:25 +05:30
Rebecca Turner
686fa1aa0e
Update refactor/splice/hlint/fourmolu/retrie/gadt plugin for GHC 9.4 (#3317)
* Set buildable on GHC 9.4

* Start work on GHC 9.4 compat

* Use patched `retrie`

* update retrie with github address. circumvent nix-prefetch-url.

* handle ExactPrint

* fix ghc 9.0 env.

* unwrap big CPP conditional for GHC 9.4

* GHC 9.4 buildable by disabling a few suggest.. functions

* enable disabled suggest...!

* hls-fourmolu-plugin is buildable

* hls-splice-plugin is buildable

* hls-hlint-plugin is buildable

* Enable plugins on GHC 9.4

* Add fourmolu for GHC 9.4

* fourmolu tweawk

* Fix `hls-hlint-plugin` build

- Build against GHC 9.4 API
- Increase upper bound on `hlint`

* Fix build of `hls-splice-plugin`

* annotation on close parenthesis. still need more work.

* found where closing parenthesis were missing

* examine internal annotation information.

* make use of makeDeltaAst. This fixes most of test failures in GHC 9.4

* remove dead code

* update apply-refact and hlint deps

* temporarily comment out hls-fourmolu-plugin.

* comment out build-tool-depends. then hls-fourmolu-plugin build succeeds with cabal v2-build

* remove unused fourmolu flake inputs

* fix ghc 9.0 build again.

* hlint and fourmolu for GHC 9.2!

* fix mistakenly overriden nix exp.

* remove unused hlint-3.3.6

* Fix CPP in hls-refactor-plugin

* Fix build error in hls-refactor-plugin

* Fix import

* Use `showErrors` instead of `showBag`

* fix initialization test error in refactor plugin.

* alternateNumberFormat and explicitFixity don't build on GHC 9.4

* force demoteIfDefer = id in typecheckModule for GHC 9.4.

* ignore tests which were already ignored with GHC 9.2

* fix extractDoesNotExportModuleName for GHC 9.4 by adjusting regex match

* use makeDeltaAst in removeRedundantConstraints

* fix addTypeAnnotationsToLiteralsTest

* Revert "alternateNumberFormat and explicitFixity don't build on GHC 9.4"

This reverts commit 4903092780031fb400b28f1e9ce696f1057855d8.

* Update flake lockfile

* Use upstream `retrie`

* Use upstream `retrie`

* Update lockfile

* Use upstream fourmolu

* fix arrow annotation on ghc 9.4

* fix flake.nix issue

* revert demoteIfDefer change for GHC 9.4.

* fix hls-splice-plugin build on GHC 9.0.2

* disable tracy on darwin.

* disable fourmolu plugin and ekg-json for now.

* fourmolu update to 0.10.1.0

* build fix for hls-refactor-plugin after merge

* update index-state.

* downgrade fourmolu to 0.9 for ghc 9.2 and 9.0

* remove unnecessary problematic Cabal-syntax dependency.

* update Cabal for ormolu in ghc 9.0 nix env.

* use custom apply-refact for now for both ghc 9.2 and 9.4

* added ghc >= 9.2 condition

* fix fourmolu with -f-fixity-th in nix env

* limit implicit-hie < 0.1.3

* add fourmolu back to build-tools-depends

* mark GHC92-failing tests to be failed on GHC 9.4

* ci failure test

* bump nix file.

* disable cachix action

* further comment out

* revive cachix action.

* remove commented-out

* fix hls-cabal-plugin by removing Cabal-syntax.
note that this is an opposite to #3383, to prioritize CI fix first.

* limit implicit-hie < 0.1.3

* added a small comment and link to the issue.

* put implicit-hie to ghcide dep

* update apply-refact rev

* use apply-refact-0.11.0.0 on hackage.

* 9.4 support for gadt and retrie plugins

Co-authored-by: Ian-Woo Kim <ianwookim@gmail.com>
Co-authored-by: Gabriella Gonzalez <gabriella@mercury.com>
Co-authored-by: Zubin Duggal <zubin.duggal@gmail.com>
2022-12-21 12:32:31 +00:00
Pepe Iborra
66599f48f2
bump shake-bench (#3411) 2022-12-18 21:34:18 +00:00
Pepe Iborra
6f5a73507f
Support optional plugins (#3193)
* Support initial generic config for plugins

This enables opt-in  plugins, i.e. plugins that are not enabled by default

* Support initial generic config for plugins

This enables opt-in  plugins, i.e. plugins that are not enabled by default

* Address review comments and remove optionality in configInitialGenericConfig

I can't remember why this was optional in the first place, which probably means no good reason for it to be

* use defConfig instead of def

* test

* descriptor is the golden source for plugin default configs

Read plugin defaults from plugin descriptor instead of copying into initial config

This is less fragile as now the initial generic config specified in the plugin
descriptor is enforced by construction.

The downside is that now the descriptor is needed to parse the config, which
means a few places where a plugin id was enough now require a plugin descriptor,
which is much harder to get. We paper over this by moving these call sites to
the Action monad.

* redundant import

* simplify

* Build fixes

* Build fixes

* pedantic fixes
2022-12-11 21:11:34 +01:00
fendor
9cb3485326
Add CI flows for GHC 9.2.5 (#3376)
* Add CI flows for GHC 9.2.5

* Prefer GHC 9.2.5 over 9.2.4

* Update list of tested-with GHC versions, as we only *test* 9.2.5

* Add GHC 9.2.5 as a supported GHC version

* Update comment in cabal-plugin about disabled test-case

* Disable GHC 9.2.5 on windows

* Fix CI for windows

* Run tests on windows for GHC 9.2.4

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
2022-12-07 12:49:59 +00:00
Rune K. Svendsen
5dbbd852ab
Parse .cabal files; show error and warning diagnostics (#2954)
* Extract cabal plugin in its own package

* hls-cabal-plugin: Add plugin

Add golden parse test for test/testdata/simple.cabal
Add module Ide.Plugin.Cabal.Diag
Also: add -Wall

Add parseCabalFileContents
Use VFS for cabal file contents

Diagnostics
 * Parse and display Errors
 * Parse and display Warnings

Code Actions
 * Code Action for License Field

* Add CI workflow

* Add test-suite for hls-cabal-plugin

* Fix various cabal issues

* Update Codeowners file for hls-cabal-plugin

* Document Bytestring is UTF-8 encoded

Co-authored-by: Julian Ospald <hasufell@posteo.de>

* Remove code duplication

* Add cabal files of interest and kick function

Configure a "kick" function for cabal files that is run when the shake
queue needs to be restarted.
Copy pastes from ghcide and 'files of interest'. Maybe more abstraction
needed.

* Add more documentation

* Mark flaky test-case as flaky with issue ref

* Make fendor the only CODEOWNER for hls-cabal-plugin

* Add missing extra-source-files for hls-cabal-plugin

* Add proper CHANGELOG entry for the first version of hls-cabal-plugin

* Add support for Cabal 3.8

* Set diagnostics source to cabal

* Remove unused function

* Add unit tests for code action utilities

* Remove overly specific logging of diagnostics from hls-cabal-plugin

* Improve logging for Cabal FOIs

* Add Range manipulation functions

* Use Range manipulation functions from hls-plugin-api

* Add more documentation for crucial shake restart function

* Add hls-cabal-plugin features to features.md

* Re-use existing GetFileContents rule

Co-authored-by: Fendor <power.walross@gmail.com>
Co-authored-by: fendor <fendor@users.noreply.github.com>
Co-authored-by: Julian Ospald <hasufell@posteo.de>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-11-21 16:45:26 +00:00
fendor
9e2037696c
Add hls-cabal-fmt-plugin to hackage release CI script and HLS library (#3335)
* Add hls-cabal-fmt-plugin to hackage release CI script

* Add cabalfmt common section to HLS

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2022-11-16 12:23:07 +00:00
VeryMilkyJoe
7020532537
Add formatting plugin for cabal files which uses cabal-fmt (#2047)
* Add plugin for formatting cabal files using cabal-fmt

* Add 'isolateTests' cabal flag to make plugin install cabal-fmt

For CI, we want to run the tests with a specific cabal-fmt version,
installed automatically by cabal.
However, locally, we might want to test with a locally installed
cabal-fmt version.
This flag allows developers to either let cabal install the
build-tool-depends or install a fitting version locally.

* Ignore failing cabal-fmt test on windows

* Add log message for missing cabal-fmt executable

Co-authored-by: Jana Chadt <jana.chadt@tuwien.ac.at>
Co-authored-by: Fendor <power.walross@gmail.com>
2022-11-11 10:25:29 +00:00
Berk Özkütük
85f7881351
New plugin: Explicit record fields (#3304)
* Initial working version

* Auto-add puns pragma, fix behavior with Hs98 fields

* Patch pragma so it adds NamedFieldPuns instead of RecordPuns

* Refactor big do block

* Make it work with record construction

* Convert to a rule based approach

* Cleanup, remove dead code

* Make it compile with all supported GHC versions

* Add tests

* Minor code reorganization

* Move common pragma logic to same file

* Remove strictness annotations

* Improve documentation

* Use interval map for efficient range filtering

* Add external documentation

* Add tests to GitHub CI

* Add debug log for collected records

* Add `getExtensions` to ghcide

* Indicate that it doesn't work with GHC 9.4

https://github.com/haskell/haskell-language-server/pull/3304#discussion_r1008034647

* Relax version bounds on base

* Add plugin to stack packages

* Add GHC 8.10 support

* Fix GHC 9.4 build failure

* Make `conPatDetails` total

* Revert "Indicate that it doesn't work with GHC 9.4"

This reverts commit 57646d35ad.

* Fix unused import caused by new compat exports

* Fix ConPat construction in GHC 8.10

* Rename test-suite to make it shorter

* Fix nix build by collecting latest hw-prim from Hackage

Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2022-11-10 01:17:50 +00:00
Elliot Marsden
4cb9ff1391
Make splice plugin compatible with GHC 9.2 (#2816)
* Compile and get all tests passing

* Add back-compat for GHC 9.0

* Update docs and build flags to enable for 9.2
2022-11-03 16:23:50 +00:00
Michael Peyton Jones
388fd40ade
Purge GHC 8.8 (#3287)
We're also dropping support for this.
2022-10-18 22:12:53 +01:00
Lei Zhu
8cef7a456a
Support ghc 9.4 for hls-class-plugin (#3258)
* Support ghc 9.4 for hls-class-plugin

* Update support table

* Update test description

* Update nix dependency
2022-10-16 11:56:43 -04:00
Pepe Iborra
9b491f7bbf
Drop compatibility with GHC 8.6.5 (#3101)
* Drop compatibility with GHC 8.6.5

* drop a few more bits

* fixup merge

Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
2022-10-11 12:18:49 +00:00
maralorn
f6dc2064d1
wrapper.in: Require runtime ghc-pkgs to be an abi compatible superset of bootpkgs (#3214)
This still makes sure that ghc has been compiled with the same core
libraries as hls while it allows runtime environments where other
packages have been added to the ghc-pkg database.

This commit also adds that file to the sdist, so that distro
packagers can use it.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-09-28 13:22:21 +00:00
Pepe Iborra
dca5cc36c7
Log plugin name and attribute errors to plugins (#3194)
* Log plugin name

* redundant import

* Attribute response error logs to plugins

* remove redundant plugin names from error messages

* improve pretty printing

* Avoid show

* simplify test messages

* Fix
2022-09-21 17:36:19 +00:00
Zubin Duggal
ddb21a0c8d Remove internal library haskell-language-server:plugins 2022-09-14 11:38:48 +05:30
Zubin Duggal
816cd6301e Prepare 1.8.0.0
Use hiedb from hackage

gitlab-ci: remove workaround for windows 9.2.2
gitlab-ci: remove workaround for windows 9.2.2

hie-bios

update hie bios

update hie bios

bounds

hie-bios fixes

hie-bios fixes

lsp 1.6

cabal.project fixes

hie-bios fixes

lsp and hie-bios from hackage

Mark hie-bios error as expectFail

hie-bios fixes

hie-bios fixes

Stack

Stack

stack fixes
2022-09-14 02:27:17 +05:30
Nick Suchecki
aad896cdc5
Update hls-retrie-plugin to be usable with 9.2.4. (#3120)
* Update hls-retrie-plugin to be usable with 9.2.4.

This is the first pass at getting hls-retrie-plugin enabled. Much of the
changes were updating to match the changes in the upstream `retrie`
package.

* Replace GHC.Paths.libdir by querying a ModSummary for the LibDir

* Looks like formatting was missed

* Revert "Looks like formatting was missed"

This reverts commit 4f6eee5a6f.

* Don't build retrie for 9.4

Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
2022-09-07 17:58:05 +00:00
Zubin Duggal
a2df919078 Make hls-code-range-plugin buildable on 9.4 by removing usused exactprint dependencies 2022-09-06 20:36:24 +05:30
Pepe Iborra
9297c98c54 enable a bunch of plugins that build with ghc 9.4 2022-09-06 20:36:24 +05:30
Nick Suchecki
08cfc78394 Change Type Signature Plugin buildable with 9.4 2022-09-06 20:36:24 +05:30
Nick Suchecki
608cfd99b4 Alternate Number Format Plugin buildable with GHC 9.4 2022-09-06 14:45:26 +05:30
Zubin Duggal
87133b0394 Fix func test 2022-09-01 14:47:55 +05:30
Zubin Duggal
6c99563a9f 9.4 support + MHU 2022-09-01 14:47:55 +05:30
Zubin Duggal
a9f1c538ac Remove exactprint dependencies from ghcide by introducing hls-refactor-plugin.
All code actions have been moved to hls-refactor-plugin

Mostly straightforward, only slight complication was that completion auto imports
depends on exactprint, but I didn't want to remove all completion logic from ghcide
just for this.

Instead, I added logic to dynamically lookup the plugin that provides
the extend import command, so that auto imports work as expected when you have
hls-refactor-plugin enabled.

Move lookupPluginId out of loop

Replace code actions with lenses in benchmarks

Allow plugins to use GetAnnotatedParsedSource by linking it in when depended on

Move lookupPluginId to IdePlugins

Add default extensions

Move traceAst
2022-08-31 00:56:35 +05:30
Pepe Iborra
d0e3e0fe3f
HLS benchmarks (#3117)
* extract ghcide:experiments-types

* extract haskell-language-server:plugins and let go of examples

The main goal here is to move the Plugins module into an internal
library so that it can be reused from the benchmark suite.

In order to
make that easier, and since they hardly serve a purpose in a repository
with 25 plugins, I delete the Example and Example2 plugin descriptors
and their dependencies.

* HLS benchmark suite

Port the ghcide benchmark suite to HLS and benchmark plugin
"configurations" independently.

This includes the following changes to the ghcide benchmark suite and
HLS:
- Support for "configurations" which are defined as sets of plugin ids.
  The benchmark will be run with only these plugins enabled and all
  others disabled
- Support for configurable concurrency. This relies on RTS -ol and -po
  flags to place the RTS traces in the target location rather than in
  the cwd

This change requires two commits, the next one places
ghcide/bench/hist/Main.hs into its final location to help 'git'
recognize the change as a file move

* ghcide/bench/hist/Main.hs -> bench/Main.hs

* CI - fix artifact names for uniqueness

* disable shorten HLS step

* Do not store eventlogs to avoid out of disk space

* render durations up to milliseconds

* shorten titles

Goal is to display the formatted CSV (via column) one row per line

* exclude formatting plugin configurations

* Extract ghcide-bench to a standalone package

* ghcide-bench: fix stderr capturing

* Fix mem stats

We parse maxResidency and allocatedBytes from the RTS -S output, but runSessionWithHandles kills the server without waiting for it to exit and these stats don't get logged.

The solution is to use runSessionWithHandles', but unfortunately it is internal and not exposed. I have raised a PR to expose it and in the meantime we need a source repo package.

* feedbacks

* delete Example plugins
2022-08-25 15:08:57 +01:00
Lei Zhu
0e74593e8d
hls-explicit-fixity-plugin (#2941)
* init hls-explicit-fixity-plugin

* Update dependencies

* Refactor: Prevent block on startup

* Run pre-commit

* Compatibility: Add emptyMessages

* Remove unused ModIface

* Comment why to make this plugin a lower priority

* Provide hover content while testing fail

* Avoid lambda

* 4 space indent

* Pass Text instead of Name

Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
2022-08-11 11:48:18 -04:00
Lei Zhu
df77e7dd2d
Support ghc-9.2.4 (#3085)
* Support ghc-9.2.4

* Restore caching workflow for ghc-9.2.3
2022-08-11 09:54:02 +01:00
Kobayashi
dc682ba118
add a prefix to plugin CPP (#3065) 2022-07-29 10:28:31 +00:00
Gregory Gerasev
078fc14dda
Stan integration #258 (#2908) 2022-07-28 02:11:31 +03:00
Kobayashi
445192e21d
refactor selection range plugin (#3003)
* update Gitpod config

* update nix shellHook & docs

* install pre-commit hook

* add kokobd as code owner to .gitpod.*

* add gen-hie to Gitpod

* add tools for doc

* remove .pre-commit-config.yaml from .gitignore

* set vscode formatter to stylish-haskell in Gitpod

* refactor selection range plugin

* refine selection range

* add CodeKind to CodeRange

* rename hls-selection-range-plugin to hls-code-range-plugin

* update docs about selection range

* cleanup RuleTypes.hs

* add the missing bang pattern

* fix subRange

* add some unit tests to CodeRange.Rules

* add tests for removeInterleaving

* add even more tests

* fix extra sources

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-07-11 04:24:35 +00:00
ˌbodʲɪˈɡrʲim
4b0b99efc1
haskell-language-server: add lower bound for githash (#3030) 2022-07-09 16:44:08 +00:00
Stefan Matting
cdc8f78a98
Turn HLS-wrapper into an LSP Server (#2960)
* Make wrapper a LSP on failure

* Fix incorrect imports

* revert import block for smaller diff

* add missing imports

* Fix: callProcess on win32 machines not called

* import container only on win32

* add missing liftIO

Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
2022-06-26 11:39:07 +00:00
fendor
907a6e645b
Teach HLS about different file extensions (#2945)
* Fix parameter switch-up

* Generalise file extension handling for plugins

NotificationHandler now distinguishes between different file extensions
RequestHandler distinguishes between different file extensions

* Introduce PluginMethod Typeclass hierarchy

The hierarchy looks as follows:

            PluginMethod (pluginEnabled)
                          |
         -----------------------------------
         |                                 |
 PluginRequestMethod             PluginNotificationMethod

* Add example plugin

* Improve documentation for plugins

* Simplify Plugin Handling code

Co-authored-by: Jana Chadt <jana.chadt@nets.at>
Co-authored-by: Jana Chadt <jana.chadt@tuwien.ac.at>
Co-authored-by: Fendor <walross.power@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-06-22 15:38:13 +00:00
Lei Zhu
e64b61e7fd
Support ghc-9.2.3 (#2936)
* Support ghc-9.2.3

* ormolu-0.5

* Update stack.yaml

Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
2022-06-16 15:29:38 +08:00
Lei Zhu
faa88f685e
A plugin for GADT syntax converter (#2899)
* initial hls-gadt-plugin

* Correct condition

* Render context correctly

* Fix typo

* Support from ghc-8.6 to ghc-9.0

* ghc8.6 compat

* Try to fix test for ghc-8.6

* Pretty name

* Add GADTs pragma automatically

* Enrich Readme

* Clean up

* Update hls docs

* Update CODEOWNERS

* Fix typo

* Rename withTempDir with withCanonicalTempDir

* Add @michaelpj's suggestions

* Pass PluginId through descriptor

* Explicit forall
2022-05-26 17:13:09 +08:00
ˌbodʲɪˈɡrʲim
4b475b0adf
hls-haddock-comments does not support ghc-exactprint >= 1.0 (#2878)
* hls-haddock-comments does not support ghc-exactprint >= 1.0

And should be marked as such otherwise `cabal install haskell-language-server` generates an unbuildable plan

* Try to make CI happy

Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
2022-05-01 13:50:12 +00:00
Lei Zhu
c14cbdbdd4
Support hls-hlint-plugin and hls-stylish-plugin for ghc9.0 and ghc9.2 (#2854)
* hls-hlint-plugin & hls-stylish-haskell-plugin rush to ghc92

* Restore allow-newer

* Add BufSpan for lower version ghc

* Add Cabal constraint for stack-9.0.1.yaml

* Try ghc-lib-parser for BufSpan

* Loose tactic compiling constraint

* Rename hlint34

* Rerun test

* Update doc

* Comment ghc-exactprint requirements

* Add test for apply-refact-0.10

* Use hackage stylish-haskell

* ghc-exactprint constraints for hls-class-plugin

* Remove uncompiled if

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-04-28 17:36:25 +00:00
Zubin Duggal
5ce21d0a77
Bump hls-test-utils to 1.3
Also need to bump the minor versions of all packages which were not bumped since 1.6.1.1
and had changes to their testsuite.
2022-04-23 16:45:47 +05:30
Zubin Duggal
41b30b5706 Prepare 1.7.0.0 2022-04-21 14:08:10 +05:30
Oliver Madine
dda3e5efae
Enable rename plugin (#2809)
* refactor rename plugin
  - add context to error messages
  - remove unnecessary unwrapping of ParsedSource
  - use HashSet for references
  - consistent naming, whitespace, indentation, imports style

* prevent renaming of built-in syntax

* limit rename scope to current module

* refine imports in rename plugin

* allow renaming with implicit module names

* update tests with cross-module renaming limitation

* enable rename plugin
  - add rename package to hackage CI
  - set default build flag to True

* add rename plugin to features docs

* add rename plugin to ghc-8.10.X stack yaml files

* improve position printing in rename error

* implement cross-module rename config option

* unignore tests for cross-module renames

* update docs for cross-module renaming

* fix within module renaming for ghc-9

* fix rename plugin language extensions for ghc-92

* add explicit GHC.Parser imports in rename plugin

* fix typo in rename docs

* use implicit import lists in rename plugin

* relocate orphaned instances from rename plugin

* Revert "relocate orphaned instances from rename plugin"

This reverts commit bb91db031e.

Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
2022-04-03 21:30:40 +00:00
Pepe Iborra
a538641bf7
Target GHC 9.2.2 (#2787)
* Target GHC 9.2.2

* fix with-compiler

* attempt to fix Mac build

* attempt to fix stack

* Apply @July541 suggestion

* add missing space

* fix yaml

* another yaml fix
2022-03-21 17:19:25 +00:00