Skip to content
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

Qualified type operator exports #226

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- Add support for untrusted workspaces ([#211](https://github.com/JustusAdam/language-haskell/pull/211)), thanks to [@maciej-irl](http://github.com/maciej-irl)
- Add support for `\cases` syntax ([#218](https://github.com/JustusAdam/language-haskell/pull/218)), thanks to [@mixphix](https://github.com/mixphix)
- Fix qualified type operators in export lists ([#191](https://github.com/JustusAdam/language-haskell/issue/191)), thanks to [@mixphix]

## 3.6.0 - 15.03.2022

Expand Down
10 changes: 4 additions & 6 deletions syntaxes/haskell.YAML-tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -675,19 +675,17 @@ repository:
- begin: '\b(?<!'')(type)\b(?!'')'
beginCaptures:
'1': {name: keyword.other.type.haskell}
end: >-
(?x)
# Type name
([\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*)
# Prefix form of type operator
| (\()\s*([\p{S}\p{P}&&[^(),;\[\]`{}_"']]+)\s*(\))
end: '(?=,|\)\s*where)'
endCaptures:
'1': {name: storage.type.haskell}
'2': {name: punctuation.paren.haskell}
'3': {name: storage.type.operator.haskell}
'4': {name: punctuation.paren.haskell}
patterns:
- include: '#comment_like'
- include: '#reserved_symbol'
- include: '#type_constructor'
- include: '#type_operator'
- include: '#record_wildcard'
- include: '#reserved_symbol'
- match: >-
Expand Down
8 changes: 8 additions & 0 deletions test/tests/Exports.hs
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,13 @@ module M
-- ^^^^ keyword.other.type.haskell
(<->)
-- ^^^ storage.type.operator.haskell
, type (Qualified.<->)
-- ^^^^ keyword.other.type.haskell
-- ^^^^^^^^^^ entity.name.namespace.haskell
-- ^^^ storage.type.operator.haskell
, type Qualified.T
-- ^^^^ keyword.other.type.haskell
-- ^^^^^^^^^^ entity.name.namespace.haskell
-- ^ storage.type.haskell
)
where