Skip to content

Commit

Permalink
Fixed type annotation end match
Browse files Browse the repository at this point in the history
Closes #91
  • Loading branch information
JustusAdam committed Apr 22, 2020
1 parent 4b64ada commit 0198702
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- Specialized highlighting for `signature`, to permit it as an identifier ([#108](https://github.com/JustusAdam/language-haskell/issues/108))
- Fixed comments occurring in place of export lists ([#104](https://github.com/JustusAdam/language-haskell/issues/104))
- Pragmas are now case insensitive ([#81](https://github.com/JustusAdam/language-haskell/issues/81))
- Fixed matcher for end of type annotations. Facilitates indented `module` blocks ([#91](https://github.com/JustusAdam/language-haskell/issues/91))

## 2.7.0 - 29.12.2019

Expand Down
3 changes: 1 addition & 2 deletions syntaxes/haskell.YAML-tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,9 @@ patterns:
(?x)
(?= # we look ahead, but we do not want to consume
(<\-) # we are the left side of a `x :: Type <- expr` bind statement
| (^(\1)?[^\s] # at least one, no-further indented, non-whitespace character. I.e. a same-level declaraion/implementation
| } # A block closed? Maybe this should also include `;`, because non-indentation based `do`
)
)
| ^(?!\1[^\s]) # at least one, no-further indented, non-whitespace character. I.e. a same-level declaration/implementation
- {include: '#data_constructor'}
- {include: '#qualifier'}
- {include: '#comments'}
Expand Down
4 changes: 2 additions & 2 deletions test/syntax-examples/test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ type T a =
Constr
a
Int

>
-- Multi line type alias with infix constructors

type UserApi = "users" :> Body '[JSON]
Expand Down Expand Up @@ -136,7 +136,7 @@ anotherFunc arg =
expression argument = arg + 7

anotherFunc arg = do
{ let thing = 5
{ let thing = 5>
; arg <- doSomething 5
; let thing = 5
; return 8
Expand Down

0 comments on commit 0198702

Please sign in to comment.