Skip to content

Commit

Permalink
qualified type operator exports
Browse files Browse the repository at this point in the history
includes instead of matching in the end

fix test comments

update changelog

remove added garbage

add test case for exporting type Qualified.T

fix magichash
  • Loading branch information
mixphix committed May 19, 2023
1 parent d05c689 commit a311c80
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
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

0 comments on commit a311c80

Please sign in to comment.