You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
overloaded record dot plugin intial version (closes#3350) (#3560)
* overloaded record dot plugin initial version (closes#3350)
* Added support to GHC 9.2, and updated documentation
Also, update the CI to test overloaded-record-dot-plugin
and added overloaded-record-dot-plugin to stack.yml
* Apply suggestions from Lei Zhu (July541)
Co-authored-by: Lei Zhu <[email protected]>
* Use GHC2021 and updated gif
* Fix test.yml formatting problem
* use coerce instead of unExt (from michaelpj)
Co-authored-by: Michael Peyton Jones <[email protected]>
* Implements michaelpj code review suggestions
* Collect records on lists instead of maybe
This way we don't need to switch back and forward between the two,
and we can also return more than one match from inside a HsExpanded
* Added documentation
* Reworded comments for spelling and clarity
* use useWithStale for the TypeCheck rule
* Update version to conform with changes on master
* No longer depend on specific hls package versions
* Fixed comments and line length issues
* Added test for HsExpanded expressions
---------
Co-authored-by: Lei Zhu <[email protected]>
Co-authored-by: Michael Peyton Jones <[email protected]>
Copy file name to clipboardExpand all lines: docs/features.md
+9
Original file line number
Diff line number
Diff line change
@@ -398,6 +398,15 @@ Known limitations:
398
398
399
399
- Cross-module renaming requires all components to be indexed, which sometimes causes [partial renames in multi-component projects](https://github.com/haskell/haskell-language-server/issues/2193).
400
400
401
+
### Rewrite to overloaded record syntax
402
+
403
+
Provided by: `hls-overloaded-record-dot-plugin`
404
+
405
+
Code action kind: `refactor.rewrite`
406
+
407
+
Rewrites record selectors to use overloaded dot syntax
`hls-overloaded-record-dot-plugin` is a plugin to convert record selectors to record dot syntax in GHC 9.2 and above.
4
+
5
+
6
+
## Demo
7
+
8
+

9
+
10
+
11
+
## Known limitations
12
+
13
+
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.
0 commit comments