summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Hatch <tim@timhatch.com>2010-12-21 00:18:03 -0800
committerTim Hatch <tim@timhatch.com>2010-12-21 00:18:03 -0800
commit050baee4a72b66b946f44bc8ef1b98b667ece706 (patch)
treec60847b194dd8c05b644152a98b3505dd0527ff9
parentb1a1f966e6ee7a9f34b1faf56682bb5126b7164a (diff)
downloadpygments-050baee4a72b66b946f44bc8ef1b98b667ece706.tar.gz
Fix parsing of haskell imports (#527)
-rw-r--r--pygments/lexers/functional.py1
-rw-r--r--tests/examplefiles/import.hs4
2 files changed, 5 insertions, 0 deletions
diff --git a/pygments/lexers/functional.py b/pygments/lexers/functional.py
index de48d992..5ba670a5 100644
--- a/pygments/lexers/functional.py
+++ b/pygments/lexers/functional.py
@@ -381,6 +381,7 @@ class HaskellLexer(RegexLexer):
'import': [
# Import statements
(r'\s+', Text),
+ (r'"', String, 'string'),
# after "funclist" state
(r'\)', Punctuation, '#pop'),
(r'qualified\b', Keyword),
diff --git a/tests/examplefiles/import.hs b/tests/examplefiles/import.hs
new file mode 100644
index 00000000..09058ae6
--- /dev/null
+++ b/tests/examplefiles/import.hs
@@ -0,0 +1,4 @@
+import "mtl" Control.Monad.Trans
+
+main :: IO ()
+main = putStrLn "hello world"