-
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.
* also add a few tests (failing for now)
- Loading branch information
Showing
7 changed files
with
167 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
-- SYNTAX TEST "source.haskell" "Exports" | ||
|
||
module M | ||
( T(f,C,g) | ||
-- ^ storage.type.haskell | ||
-- ^ constant.other.haskell | ||
-- ^ ^ entity.name.function.haskell | ||
, S(..) | ||
-- ^ storage.type.haskell | ||
, (:->)((:>)) | ||
-- ^^^ storage.type.haskell | ||
-- ^^ constant.other.haskell | ||
, (:<>)(C,a,D,E) | ||
-- ^^^ storage.type.haskell | ||
-- ^ ^ ^ constant.other.haskell | ||
-- ^ entity.name.function.haskell | ||
, A((<>), (:>>)) | ||
-- ^ storage.type.haskell | ||
-- ^^ ^^^ constant.other.haskell | ||
, pattern P | ||
-- ^ constant.other.haskell | ||
, pattern (:|) | ||
-- ^^ constant.other.haskell | ||
, type T | ||
-- ^ storage.type.haskell | ||
, type (:-) | ||
-- ^^ storage.type.haskell | ||
, type (<+>) | ||
-- ^^^ storage.type.haskell | ||
) | ||
where |
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" "Haddock documentation" | ||
|
||
-- | Doc | ||
-- ^^^ comment.block.documentation.haskell | ||
|
||
{-| doc | ||
-- ^^^ comment.block.documentation.haskell | ||
doc | ||
-- ^^^ comment.block.documentation.haskell | ||
doc -} | ||
-- ^^^ comment.block.documentation.haskell | ||
|
||
|
||
g :: a -- ^ doc | ||
-- ^^^ comment.block.documentation.haskell | ||
-> b -- ^ doc | ||
-- ^^^ comment.block.documentation.haskell | ||
-> c |
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,28 @@ | ||
-- SYNTAX TEST "source.haskell" "Multi-line type signatures" | ||
|
||
f :: A | ||
-- ^ storage.type.haskell | ||
-> B | ||
-- ^ storage.type.haskell | ||
-> C | ||
-- ^ storage.type.haskell | ||
|
||
f | ||
:: A -> B | ||
-- ^ ^ storage.type.haskell | ||
|
||
f | ||
:: forall a b | ||
-- ^^^^^^ keyword.other.forall.haskell | ||
-- ^ ^ variable.other.generic-type.haskell | ||
. C x | ||
-- ^ storage.type.haskell | ||
-- ^ variable.other.generic-type.haskell | ||
=> D a | ||
-- ^ storage.type.haskell | ||
-- ^ variable.other.generic-type.haskell | ||
=> E b | ||
-- ^ storage.type.haskell | ||
-- ^ variable.other.generic-type.haskell | ||
-> G | ||
-- ^ 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,60 @@ | ||
-- SYNTAX TEST "source.haskell" "Type signatures in various positions" | ||
|
||
f :: ( x :: Int ) -> Int | ||
-- <~~-- ^^ keyword.operator.double-colon.haskell | ||
-- ^^^ ^^^ storage.type.haskell | ||
f x = do | ||
-- ^ keyword.operator.eq.haskell | ||
let x :: Int | ||
-- ^^ keyword.operator.double-colon.haskell | ||
-- ^^^ storage.type.haskell | ||
x = 3 | ||
-- ^ keyword.operator.eq.haskell | ||
let | ||
y :: Int | ||
-- ^^ keyword.operator.double-colon.haskell | ||
-- ^^^ storage.type.haskell | ||
y = 3 | ||
-- ^ keyword.operator.eq.haskell | ||
z :: Int = 3 | ||
-- ^^ keyword.operator.double-colon.haskell | ||
-- ^^^ storage.type.haskell | ||
( w :: Int ) = 4 | ||
-- ^^ keyword.operator.double-colon.haskell | ||
-- ^^^ storage.type.haskell | ||
-- ^ keyword.operator.eq.haskell | ||
x :: Int <- 3 | ||
-- ^^ keyword.operator.double-colon.haskell | ||
-- ^^^ storage.type.haskell | ||
-- ^^ keyword.operator.haskell | ||
( x :: Int ) <- 4 | ||
-- ^^ keyword.operator.double-colon.haskell | ||
-- ^^^ storage.type.haskell | ||
-- ^^ keyword.operator.haskell | ||
case x :: Int of | ||
-- ^^ keyword.operator.double-colon.haskell | ||
-- ^^^ storage.type.haskell | ||
( 2 :: Int ) -> 3 | ||
-- ^^ keyword.operator.double-colon.haskell | ||
-- ^^^ storage.type.haskell | ||
-- ^^ keyword.operator.haskell | ||
where x :: Int | ||
-- ^^ keyword.operator.double-colon.haskell | ||
-- ^^^ storage.type.haskell | ||
x = 3 | ||
-- ^ keyword.operator.eq.haskell | ||
where | ||
y :: Int | ||
-- ^^ keyword.operator.double-colon.haskell | ||
-- ^^^ storage.type.haskell | ||
y = 3 | ||
-- ^ keyword.operator.eq.haskell | ||
|
||
type T ( x :: Int ) :: ( k :: D x ) | ||
-- ^^ ^^ ^^ keyword.operator.double-colon.haskell | ||
-- ^ ^^^ ^ storage.type.haskell | ||
-- ^ ^ ^ variable.other.generic-type.haskell | ||
type T x = X :: D x | ||
-- ^^ keyword.operator.double-colon.haskell | ||
-- ^ ^ ^ storage.type.haskell | ||
-- ^ ^ variable.other.generic-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,22 @@ | ||
-- SYNTAX TEST "source.haskell" "Deriving strategies (different lines)" | ||
|
||
data B = B deriving A via B | ||
-- ^^^^^^^^ keyword.other.deriving.haskell | ||
-- ^^^ keyword.other.via.haskell | ||
-- ^ ^ storage.type.haskell | ||
data B = B deriving stock ( Eq, Generic ) | ||
-- ^^^^^^^^ keyword.other.deriving.haskell | ||
-- ^^^^^ keyword.other.deriving-strategy.haskell | ||
-- ^^ ^^^^^^^ storage.type.haskell | ||
data B = B deriving anyclass NFData | ||
-- ^^^^^^^^ keyword.other.deriving.haskell | ||
-- ^^^^^^^^ keyword.other.deriving-strategy.haskell | ||
-- ^^^^^^ storage.type.haskell | ||
|
||
newtype StateMonad b c r = StateMonad (StateT (MyState (Something b c) b) IO r) | ||
deriving (MonadState (MyState (Something b c) b), MonadIO, Monad) | ||
-- ^^^^^^^^ keyword.other.deriving.haskell | ||
via ( State ( s, t ) r ) | ||
-- ^^^ keyword.other.via.haskell | ||
-- ^^^^^ storage.type.haskell | ||
-- ^ ^ ^ variable.other.generic-type.haskell |