-
-
Notifications
You must be signed in to change notification settings - Fork 391
overloaded record dot plugin intial version (closes #3350) #3560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
joyfulmantis
merged 22 commits into
haskell:master
from
joyfulmantis:overloaded-record-dot
May 26, 2023
Merged
Changes from 4 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
6d8bc5a
overloaded record dot plugin intial version (closes #3350)
joyfulmantis fcd749b
Added support to GHC 9.2, and updated documentation
joyfulmantis 5013c69
Apply suggestions from Lei Zhu (July541)
joyfulmantis 00e71fe
Use GHC2021 and updated gif
joyfulmantis 1b78ce7
Fix test.yml formatting problem
joyfulmantis c8e84c6
Merge branch 'master' into master
joyfulmantis bf764a1
use coerce instead of unExt (from michaelpj)
joyfulmantis 239737b
Merge branch 'master' into master
joyfulmantis 3270e7a
Implements michaelpj code review suggestions
joyfulmantis 25be42a
Collect records on lists instead of maybe
joyfulmantis 3746332
Added documentation
joyfulmantis 0b9d120
Reworded comments for spelling and clarity
joyfulmantis 1363325
use useWithStale for the TypeCheck rule
joyfulmantis 1f61243
Merge branch 'master' into master
joyfulmantis 7a3bc3c
Merge branch 'master' into master
joyfulmantis d5b272a
Merge branch 'master' into overloaded-record-dot
joyfulmantis fcc52a9
Update version to conform with changes on master
joyfulmantis 961bcaa
No longer depend on specific hls package versions
joyfulmantis 5f77748
Fixed comments and line length issues
joyfulmantis bab5a71
Added test for HsExpanded expressions
joyfulmantis c0137ca
Merge branch 'master' into overloaded-record-dot
joyfulmantis a81cde7
Merge branch 'master' into overloaded-record-dot
joyfulmantis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Revision history for hls-overloaded-record-dot-plugin | ||
|
||
## 1.0.0.0 -- 2023-04-16 | ||
|
||
* First version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Copyright (c) 2023, Nathan Maxson | ||
|
||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above | ||
copyright notice, this list of conditions and the following | ||
disclaimer in the documentation and/or other materials provided | ||
with the distribution. | ||
|
||
* Neither the name of Nathan Maxson nor the names of other | ||
contributors may be used to endorse or promote products derived | ||
from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Explicit Record Fields Plugin | ||
|
||
`hls-overloaded-record-dot-plugin` is a plugin to convert record selectors to record dot syntax in GHC 9.2 and above. | ||
|
||
|
||
## Demo | ||
|
||
 | ||
|
||
|
||
## Known limitations | ||
|
||
hls-overloaded-record-dot-plugin currently only converts record selectors to the record dot syntax, and will not help you convert your record updaters to overloaded record update syntax. | ||
|
||
|
||
## Change log | ||
### 1.0.0.0 | ||
- Release |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 64 additions & 0 deletions
64
plugins/hls-overloaded-record-dot-plugin/hls-overloaded-record-dot-plugin.cabal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
cabal-version: 3.0 | ||
name: hls-overloaded-record-dot-plugin | ||
version: 1.0.0.0 | ||
synopsis: Overloaded record dot plugin for Haskell Language Server | ||
description: | ||
Please see the README on GitHub at <https://github.com/haskell/haskell-language-server#readme> | ||
license: BSD-3-Clause | ||
license-file: LICENSE | ||
author: Nathan Maxson | ||
maintainer: joyfulmantis@gmail.com | ||
category: Development | ||
build-type: Simple | ||
extra-doc-files: CHANGELOG.md | ||
extra-source-files: | ||
test/testdata/**/*.hs | ||
|
||
source-repository head | ||
type: git | ||
location: https://github.com/haskell/haskell-language-server | ||
|
||
common warnings | ||
ghc-options: -Wall | ||
|
||
library | ||
if impl(ghc < 9.2) | ||
buildable: False | ||
else | ||
buildable: True | ||
import: warnings | ||
exposed-modules: Ide.Plugin.OverloadedRecordDot | ||
build-depends: | ||
, base >=4.16 && <5 | ||
, ghcide ^>=1.10 | ||
, hls-plugin-api ^>=1.6 | ||
, lsp | ||
, lens | ||
, hls-graph | ||
, text | ||
, syb | ||
, transformers | ||
, ghc-boot-th | ||
, unordered-containers | ||
, containers | ||
hs-source-dirs: src | ||
default-language: GHC2021 | ||
|
||
test-suite tests | ||
if impl(ghc < 9.2) | ||
buildable: False | ||
else | ||
buildable: True | ||
import: warnings | ||
default-language: GHC2021 | ||
type: exitcode-stdio-1.0 | ||
hs-source-dirs: test | ||
main-is: Main.hs | ||
build-depends: | ||
, base | ||
, filepath | ||
, text | ||
, hls-overloaded-record-dot-plugin | ||
, lsp-test | ||
, hls-test-utils | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.