-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvements to multiline type/data declarations
- Loading branch information
Showing
17 changed files
with
404 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
-- SYNTAX TEST "source.haskell" "Intervening block comments shouldn't affect highlighting" | ||
|
||
|
||
data A | ||
-- ^ storage.type.haskell | ||
{- comment line not gobbled up by the preprocessor | ||
over multiple lines -} | ||
-- <~~---------------------- comment.block.haskell | ||
= A | ||
-- ^ constant.other.haskell | ||
|
||
newtype B = | ||
-- ^ storage.type.haskell | ||
{- comment line not gobbled up by the preprocessor -} | ||
-- <~~----------------------------------------------------- comment.block.haskell | ||
B | ||
-- ^ constant.other.haskell | ||
|
||
data Foo where | ||
{- comment line not gobbled up by the preprocessor | ||
over multiple lines -} | ||
-- <---------------------- comment.block.haskell | ||
MkFoo :: Foo | ||
-- ^^^^^^^^^^^^ meta.declaration.type.gadt.haskell | ||
-- ^^^^^ constant.other.haskell | ||
-- ^^^ storage.type.haskell | ||
|
||
dbPageWrapper :: (DashBoardPage p, Monad m) => | ||
{- comment line not gobbled up by the preprocessor | ||
over | ||
multiple | ||
lines -} | ||
-- <~----------- comment.block.haskell | ||
T.Text -> p -> HtmlT m a -> HtmlT m b -> HtmlT m b | ||
-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function.type-declaration.haskell | ||
-- ^^^^^ storage.type.haskell | ||
|
||
type T a | ||
{- comment line not gobbled up by the preprocessor | ||
over multiple | ||
lines -} | ||
-- <-------- comment.block.haskell | ||
= Int | ||
-- ^^^ storage.type.haskell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,37 @@ | ||
-- SYNTAX TEST "source.haskell" "Intervening comments shouldn't affect highlighting" | ||
|
||
data Foo where | ||
{- comment line not gobbled up by the preprocessor -} | ||
MkFoo :: Foo | ||
-- ^^^^^^^^^^^^ meta.declaration.type.gadt.haskell | ||
-- ^^^^^ constant.other.haskell | ||
-- ^^^ storage.type.haskell | ||
|
||
dbPageWrapper :: (DashBoardPage p, Monad m) => | ||
{- comment line not gobbled up by the preprocessor -} | ||
T.Text -> p -> HtmlT m a -> HtmlT m b -> HtmlT m b | ||
-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function.type-declaration.haskell | ||
-- ^^^^^ storage.type.haskell | ||
data A | ||
-- ^ storage.type.haskell | ||
-- comment line not gobbled up by the preprocessor | ||
-- <~~-------------------------------------------------- comment.line.double-dash.haskell | ||
= A | ||
-- ^ constant.other.haskell | ||
|
||
type T a | ||
{- comment line not gobbled up by the preprocessor -} | ||
= Int | ||
-- ^^^ storage.type.haskell | ||
newtype B = | ||
-- ^ storage.type.haskell | ||
-- comment line not gobbled up by the preprocessor | ||
-- <~~-------------------------------------------------- comment.line.double-dash.haskell | ||
B | ||
-- ^ constant.other.haskell | ||
|
||
data Foo where | ||
-- comment line not gobbled up by the preprocessor | ||
-- <~~-------------------------------------------------- comment.line.double-dash.haskell | ||
MkFoo :: Foo | ||
-- ^^^^^^^^^^^^ meta.declaration.type.gadt.haskell | ||
-- ^^^^^ constant.other.haskell | ||
-- ^^^ storage.type.haskell | ||
|
||
dbPageWrapper :: (DashBoardPage p, Monad m) => | ||
-- comment line not gobbled up by the preprocessor | ||
-- <~~-------------------------------------------------- comment.line.double-dash.haskell | ||
T.Text -> p -> HtmlT m a -> HtmlT m b -> HtmlT m b | ||
-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function.type-declaration.haskell | ||
-- ^^^^^ storage.type.haskell | ||
|
||
type T a | ||
-- comment line not gobbled up by the preprocessor | ||
-- <~~-------------------------------------------------- comment.line.double-dash.haskell | ||
= Int | ||
-- ^^^ storage.type.haskell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
-- SYNTAX TEST "source.haskell" "Indented data declarations" | ||
|
||
data T = C T | ||
|
||
data T = C T | ||
-- ^^^^ keyword.other.data.haskell | ||
-- ^ keyword.operator.eq.haskell | ||
-- ^ constant.other.haskell | ||
-- ^ ^ storage.type.haskell | ||
|
||
|
||
data instance T = C T | ||
-- ^^^^ keyword.other.data.haskell | ||
-- ^^^^^^^^ keyword.other.instance.haskell | ||
-- ^ keyword.operator.eq.haskell | ||
-- ^ constant.other.haskell | ||
-- ^ ^ storage.type.haskell | ||
|
Oops, something went wrong.