summaryrefslogtreecommitdiff
path: root/extensions/SyntaxHighlight_GeSHi/geshi/geshi/haskell.php
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/SyntaxHighlight_GeSHi/geshi/geshi/haskell.php')
-rw-r--r--extensions/SyntaxHighlight_GeSHi/geshi/geshi/haskell.php58
1 files changed, 26 insertions, 32 deletions
diff --git a/extensions/SyntaxHighlight_GeSHi/geshi/geshi/haskell.php b/extensions/SyntaxHighlight_GeSHi/geshi/geshi/haskell.php
index d3b494ed..6fdc2cec 100644
--- a/extensions/SyntaxHighlight_GeSHi/geshi/geshi/haskell.php
+++ b/extensions/SyntaxHighlight_GeSHi/geshi/geshi/haskell.php
@@ -2,17 +2,17 @@
/*************************************************************************************
* haskell.php
* ----------
- * Author: Jason Dagit (dagit@codersbase.com) based on ocaml.php by Flaie (fireflaie@gmail.com)
+ * Author: Daniel Mlot (duplode_1 at yahoo dot com dot br)
+ * Based on haskell.php by Jason Dagit (dagit@codersbase.com), which was
+ * based on ocaml.php by Flaie (fireflaie@gmail.com).
* Copyright: (c) 2005 Flaie, Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.8.11
- * Date Started: 2005/08/27
+ * Release Version: 1.0.8.12
+ * Date Started: 2014/05/12
*
* Haskell language file for GeSHi.
*
* CHANGES
* -------
- * 2005/08/27 (1.0.0)
- * - First Release
* 2013/09/28
* - Single quotes dropped from QUOTEMARKS to resolve <https://bugzilla.wikimedia.org/52509>.
* Change is local to SyntaxHighlight_GeSHi, made by Ori Livneh (ori@wikimedia.org), based
@@ -22,9 +22,6 @@
* Upstream patch (stalled since 2012):
* <http://sourceforge.net/p/geshi/bugs/219/>
*
- * TODO (updated 2005/08/27)
- * -------------------------
- *
*************************************************************************************
*
* This file is part of GeSHi.
@@ -66,7 +63,7 @@ $language_data = array (
'instance', 'let', 'in', 'module', 'newtype',
'qualified', 'type', 'where'
),
- /* define names of main librarys, so we can link to it */
+ /* define names of main libraries, so we can link to it */
2 => array(
'Foreign', 'Numeric', 'Prelude'
),
@@ -115,35 +112,34 @@ $language_data = array (
'interact', 'readFile', 'writeFile', 'appendFile',
'readIO', 'readLn', 'ioError', 'userError', 'catch'
),
- /* here Prelude Types */
+ /* Prelude types */
4 => array (
- 'Bool', 'Maybe', 'Either', 'Ord', 'Ordering',
- 'Char', 'String', 'Eq', 'Enum', 'Bounded',
+ 'Bool', 'Maybe', 'Either', 'Ordering',
+ 'Char', 'String',
'Int', 'Integer', 'Float', 'Double', 'Rational',
- 'Num', 'Real', 'Integral', 'Fractional',
- 'Floating', 'RealFrac', 'RealFloat', 'Monad',
- 'Functor', 'Show', 'ShowS', 'Read', 'ReadS',
- 'IO'
+ 'ShowS', 'ReadS',
+ 'IO', 'IOError', 'IOException'
),
- /* finally Prelude Exceptions */
+ /* Prelude classes */
5 => array (
- 'IOError', 'IOException'
+ 'Ord', 'Eq', 'Enum', 'Bounded',
+ 'Num', 'Real', 'Integral', 'Fractional',
+ 'Floating', 'RealFrac', 'RealFloat',
+ 'Monad', 'Functor',
+ 'Show', 'Read'
)
),
- /* highlighting symbols is really important in Haskell */
+ /* Most symbol combinations can be valid Haskell operators */
'SYMBOLS' => array(
- '|', '->', '<-', '@', '!', '::', '_', '~', '=', '?',
- '&&', '||', '==', '/=', '<', '<=', '>',
- '>=','+', '-', '*','/', '%', '**', '^', '^^',
- '>>=', '>>', '=<<', '$', '.', ',', '$!',
- '++', '!!'
+ '!', '@', '#', '$', '%', '&', '*', '-', '+', '=',
+ '^', '~', '|', '\\', '>', '<', ':', '?', '/'
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => false,
- 1 => true,
- 2 => true, /* functions name are case seinsitive */
- 3 => true, /* types name too */
- 4 => true, /* finally exceptions too */
+ 1 => true, /* Haskell is a case sensitive language */
+ 2 => true,
+ 3 => true,
+ 4 => true,
5 => true
),
'STYLES' => array(
@@ -152,7 +148,7 @@ $language_data = array (
2 => 'color: #06c; font-weight: bold;', /* blue as well */
3 => 'font-weight: bold;', /* make the preduled functions bold */
4 => 'color: #cccc00; font-weight: bold;', /* give types a different bg */
- 5 => 'color: maroon;'
+ 5 => 'color: maroon; font-weight: bold;' /* similarly for classes */
),
'COMMENTS' => array(
1 => 'color: #5d478b; font-style: italic;',
@@ -193,7 +189,7 @@ $language_data = array (
/* link to Prelude types */
4 => 'http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t:{FNAME}',
/* link to Prelude exceptions */
- 5 => 'http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t:{FNAME}',
+ 5 => 'http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t:{FNAME}'
),
'OOLANG' => false,
'OBJECT_SPLITTERS' => array(
@@ -206,5 +202,3 @@ $language_data = array (
'HIGHLIGHT_STRICT_BLOCK' => array(
)
);
-
-?> \ No newline at end of file