Skip to content

Commit

Permalink
Fixed data constructors
Browse files Browse the repository at this point in the history
Closes #122
  • Loading branch information
JustusAdam committed Apr 27, 2020
1 parent 0dca745 commit 8424407
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
([#72](https://github.com/JustusAdam/language-haskell/issues/72))
- Fixed highlighting for GADT's when `::` follows on a new line
([#119](https://github.com/JustusAdam/language-haskell/issues/119))
- Fixed regression [#122](https://github.com/JustusAdam/language-haskell/issues/122), constructor
patterns

## 3.0.0 - 26.04.2020

Expand Down
2 changes: 1 addition & 1 deletion syntaxes/haskell.YAML-tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ repository:
name: keyword.operator.period.haskell
data_constructor:
match: >-
\b[\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*(?!\.|\S)
\b[\p{Lu}\p{Lt}][\p{Ll}_\p{Lu}\p{Lt}\p{Nd}']*\b
name: constant.other.haskell
qualifier:
match: >-
Expand Down
7 changes: 7 additions & 0 deletions test/syntax-examples/test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -377,3 +377,10 @@ data family DF (x :: Bool)
data instance DF 'True = DCTrue Int
data instance DF 'False where
DCFalse :: Float -> DF 'False

-- Regression #122
-- All three constructors should be the same

f (A,B) = 3
f ( A,B ) = 3
f ( A ,B ) = 3

0 comments on commit 8424407

Please sign in to comment.