diff --git a/autotests/folding/highlight.hs.fold b/autotests/folding/highlight.hs.fold --- a/autotests/folding/highlight.hs.fold +++ b/autotests/folding/highlight.hs.fold @@ -15,6 +15,8 @@ -} +import Prelude -- + -- a data definition data Tree a = Br (Tree a) (Tree a) | Leaf a | Nil deriving (Show, Eq) diff --git a/autotests/html/highlight.hs.html b/autotests/html/highlight.hs.html --- a/autotests/html/highlight.hs.html +++ b/autotests/html/highlight.hs.html @@ -21,9 +21,11 @@ -} +import Prelude -- + -- a data definition -data Tree a = Br (Tree a) (Tree a) | Leaf a | Nil deriving (Show, Eq) +data Tree a = Br (Tree a) (Tree a) | Leaf a | Nil deriving (Show, Eq) -- function definition, "funnyfunction::", "Integer", "Int", "Bool" should be highlighted @@ -35,29 +37,29 @@ -- first line of function definitions (type declaration) should be highlighted strangefunction::Int->String -strangefunction 1 = "hello" -strangefunction 2 = "what's up" -strangefunction 3 = (strangefunction 1) ++ ", " ++ (strangefunction 2) -strangefunction 4 = 'a':'b':'c':'"':[] -- will return "abc" -strangefunction 5 = '\n':[] -strangefunction 6 = '\invalidhaskell':[] +strangefunction 1 = "hello" +strangefunction 2 = "what's up" +strangefunction 3 = (strangefunction 1) ++ ", " ++ (strangefunction 2) +strangefunction 4 = 'a':'b':'c':'"':[] -- will return "abc" +strangefunction 5 = '\n':[] +strangefunction 6 = '\invalidhaskell':[] -- function name including the single quote character -- and infix operator (`div`) justtesting'::Int->Int -justtesting' 2 = 2+1 -justtesting' 9 = 7 `div` 2 +justtesting' 2 = 2+1 +justtesting' 9 = 7 `div` 2 -- same definition as above, slightly different function name and a couple more whitespaces justtesting'' :: Int -> Int -justtesting'' 2 = 3 -justtesting'' 9 = 3 + 9 - 9 +justtesting'' 2 = 3 +justtesting'' 9 = 3 + 9 - 9 -- the following lines are copied out of Haskell's "Prelude.hs" -infixl 7 *, /, `quot`, `rem`, `div`, `mod`, :%, % +infixl 7 *, /, `quot`, `rem`, `div`, `mod`, :%, % -- everything highlighted except the "a" @@ -82,7 +84,7 @@ -- this stuff is not handled yet -!!, %, &&, $!, $, *, **, -,., /=, <, <=, =<<, ==, >, >=, >>, >>=, ^, ^^, ++, || +!!, %, &&, $!, $, *, **, -,., /=, <, <=, =<<, ==, >, >=, >>, >>=, ^, ^^, ++, || -- functions diff --git a/autotests/html/highlight.lhs.html b/autotests/html/highlight.lhs.html --- a/autotests/html/highlight.lhs.html +++ b/autotests/html/highlight.lhs.html @@ -23,7 +23,7 @@ a data definition -> data Tree a = Br (Tree a) (Tree a) | Leaf a | Nil deriving (Show, Eq) +> data Tree a = Br (Tree a) (Tree a) | Leaf a | Nil deriving (Show, Eq) function definition, "funnyfunction::", "Integer", "Int", "Bool" should be highlighted @@ -35,29 +35,29 @@ first line of function definitions (type declaration) should be highlighted > strangefunction::Int->String -> strangefunction 1 = "hello" -> strangefunction 2 = "what's up" -> strangefunction 3 = (strangefunction 1) ++ ", " ++ (strangefunction 2) -> strangefunction 4 = 'a':'b':'c':'"':[] -- will return "abc" -> strangefunction 5 = '\n':[] -> strangefunction 6 = '\invalidhaskell':[] +> strangefunction 1 = "hello" +> strangefunction 2 = "what's up" +> strangefunction 3 = (strangefunction 1) ++ ", " ++ (strangefunction 2) +> strangefunction 4 = 'a':'b':'c':'"':[] -- will return "abc" +> strangefunction 5 = '\n':[] +> strangefunction 6 = '\invalidhaskell':[] function name including the single quote character and infix operator (`div`) > justtesting'::Int->Int -> justtesting' 2 = 2+1 -> justtesting' 9 = 7 `div` 2 +> justtesting' 2 = 2+1 +> justtesting' 9 = 7 `div` 2 same definition as above, slightly different function name and a couple more whitespaces > justtesting'' :: Int -> Int -> justtesting'' 2 = 3 -> justtesting'' 9 = 3 + 9 - 9 +> justtesting'' 2 = 3 +> justtesting'' 9 = 3 + 9 - 9 the following lines are copied out of Haskell's "Prelude.hs" -> infixl 7 *, /, `quot`, `rem`, `div`, `mod`, :%, % +> infixl 7 *, /, `quot`, `rem`, `div`, `mod`, :%, % everything highlighted except the "a" @@ -81,7 +81,7 @@ this stuff is not handled yet -> !!, %, &&, $!, $, *, **, -,., /=, <, <=, =<<, ==, >, >=, >>, >>=, ^, ^^, ++, || +> !!, %, &&, $!, $, *, **, -,., /=, <, <=, =<<, ==, >, >=, >>, >>=, ^, ^^, ++, || functions diff --git a/autotests/input/highlight.hs b/autotests/input/highlight.hs --- a/autotests/input/highlight.hs +++ b/autotests/input/highlight.hs @@ -15,6 +15,8 @@ -} +import Prelude -- + -- a data definition data Tree a = Br (Tree a) (Tree a) | Leaf a | Nil deriving (Show, Eq) diff --git a/autotests/reference/highlight.hs.ref b/autotests/reference/highlight.hs.ref --- a/autotests/reference/highlight.hs.ref +++ b/autotests/reference/highlight.hs.ref @@ -15,6 +15,8 @@
-}

+import Prelude --
+
-- a data definition

data Tree a = Br (Tree a) (Tree a) | Leaf a | Nil deriving (Show, Eq)
diff --git a/data/syntax/haskell.xml b/data/syntax/haskell.xml --- a/data/syntax/haskell.xml +++ b/data/syntax/haskell.xml @@ -1,6 +1,6 @@ - + case @@ -536,7 +536,7 @@ - + @@ -613,7 +613,7 @@ - + @@ -627,8 +627,8 @@ - - + +