--- a/plugins/geshi/geshi/haskell.php Sun Feb 10 19:00:04 2008 -0500
+++ b/plugins/geshi/geshi/haskell.php Fri May 29 19:30:59 2009 -0400
@@ -2,12 +2,10 @@
/*************************************************************************************
* haskell.php
* ----------
- * Author: Jason Dagit (dagit@codersbase.com) based on ocaml.php by Flaie (fireflaie@gmail.com)
+ * Author: Jason Dagit (dagit@codersbase.com) based on ocaml.php by Flaie (fireflaie@gmail.com)
* Copyright: (c) 2005 Flaie, Nigel McNie (http://qbnz.com/highlighter)
- * Release Version: 1.0.7.20
- * CVS Revision Version: $Revision: 1.6 $
+ * Release Version: 1.0.8.2
* Date Started: 2005/08/27
- * Last Modified: $Date: 2006/02/25 00:46:33 $
*
* Haskell language file for GeSHi.
*
@@ -43,78 +41,79 @@
'LANG_NAME' => 'Haskell',
'COMMENT_SINGLE' => array( 1 => '--'),
'COMMENT_MULTI' => array('{-' => '-}'),
+ 'COMMENT_REGEXP' => array(2 => "/-->/"),
'CASE_KEYWORDS' => 0,
'QUOTEMARKS' => array('"'),
'ESCAPE_CHAR' => "\\",
'KEYWORDS' => array(
- /* main haskell keywords */
+ /* main haskell keywords */
1 => array(
- 'as',
- 'case', 'of', 'class', 'data', 'default',
- 'deriving', 'do', 'forall', 'hiding', 'if', 'then',
- 'else', 'import', 'infix', 'infixl', 'infixr',
- 'instance', 'let', 'in', 'module', 'newtype',
- 'qualified', 'type', 'where'
+ 'as',
+ 'case', 'of', 'class', 'data', 'default',
+ 'deriving', 'do', 'forall', 'hiding', 'if', 'then',
+ 'else', 'import', 'infix', 'infixl', 'infixr',
+ 'instance', 'let', 'in', 'module', 'newtype',
+ 'qualified', 'type', 'where'
),
/* define names of main librarys, so we can link to it */
2 => array(
- 'Foreign', 'Numeric', 'Prelude'
- ),
+ 'Foreign', 'Numeric', 'Prelude'
+ ),
/* just link to Prelude functions, cause it's the default opened library when starting Haskell */
3 => array(
- 'not', 'otherwise', 'maybe',
- 'either', 'fst', 'snd', 'curry', 'uncurry',
- 'compare',
- 'max', 'min', 'succ', 'pred', 'toEnum', 'fromEnum',
- 'enumFrom', 'enumFromThen', 'enumFromTo',
- 'enumFromThenTo', 'minBound', 'maxBound',
- 'negate', 'abs', 'signum',
- 'fromInteger', 'toRational', 'quot', 'rem',
- 'div', 'mod', 'quotRem', 'divMod', 'toInteger',
- 'recip', 'fromRational', 'pi', 'exp',
- 'log', 'sqrt', 'logBase', 'sin', 'cos',
- 'tan', 'asin', 'acos', 'atan', 'sinh', 'cosh',
- 'tanh', 'asinh', 'acosh', 'atanh',
- 'properFraction', 'truncate', 'round', 'ceiling',
- 'floor', 'floatRadix', 'floatDigits', 'floatRange',
- 'decodeFloat', 'encodeFloat', 'exponent',
- 'significand', 'scaleFloat', 'isNaN', 'isInfinite',
- 'isDenomalized', 'isNegativeZero', 'isIEEE',
- 'atan2', 'subtract', 'even', 'odd', 'gcd',
- 'lcm', 'fromIntegral', 'realToFrac',
- 'return', 'fail', 'fmap',
- 'mapM', 'mapM_', 'sequence', 'sequence_',
- 'id', 'const','flip',
- 'until', 'asTypeOf', 'error', 'undefined',
- 'seq','map','filter', 'head',
- 'last', 'tail', 'init', 'null', 'length',
- 'reverse', 'foldl', 'foldl1', 'foldr',
- 'foldr1', 'and', 'or', 'any', 'all', 'sum',
- 'product', 'concat', 'concatMap', 'maximum',
- 'minimum', 'scanl', 'scanl1', 'scanr', 'scanr1',
- 'iterate', 'repeat', 'cycle', 'take', 'drop',
- 'splitAt', 'teakWhile', 'dropWhile', 'span',
- 'break', 'elem', 'notElem', 'lookup', 'zip',
- 'zip3', 'zipWith', 'zipWith3', 'unzip', 'unzip3',
- 'unzip', 'unzip3', 'lines', 'words', 'unlines',
- 'unwords', 'showPrec', 'show', 'showList',
- 'shows', 'showChar', 'showString', 'showParen',
- 'readsPrec', 'readList', 'reads', 'readParen',
- 'read', 'lex', 'putChar', 'putStr', 'putStrLn',
- 'print', 'getChar', 'getLine', 'getContents',
- 'interact', 'readFile', 'writeFile', 'appendFile',
- 'readIO', 'readLn', 'ioError', 'userError', 'catch'
- ),
+ 'not', 'otherwise', 'maybe',
+ 'either', 'fst', 'snd', 'curry', 'uncurry',
+ 'compare',
+ 'max', 'min', 'succ', 'pred', 'toEnum', 'fromEnum',
+ 'enumFrom', 'enumFromThen', 'enumFromTo',
+ 'enumFromThenTo', 'minBound', 'maxBound',
+ 'negate', 'abs', 'signum',
+ 'fromInteger', 'toRational', 'quot', 'rem',
+ 'div', 'mod', 'quotRem', 'divMod', 'toInteger',
+ 'recip', 'fromRational', 'pi', 'exp',
+ 'log', 'sqrt', 'logBase', 'sin', 'cos',
+ 'tan', 'asin', 'acos', 'atan', 'sinh', 'cosh',
+ 'tanh', 'asinh', 'acosh', 'atanh',
+ 'properFraction', 'truncate', 'round', 'ceiling',
+ 'floor', 'floatRadix', 'floatDigits', 'floatRange',
+ 'decodeFloat', 'encodeFloat', 'exponent',
+ 'significand', 'scaleFloat', 'isNaN', 'isInfinite',
+ 'isDenomalized', 'isNegativeZero', 'isIEEE',
+ 'atan2', 'subtract', 'even', 'odd', 'gcd',
+ 'lcm', 'fromIntegral', 'realToFrac',
+ 'return', 'fail', 'fmap',
+ 'mapM', 'mapM_', 'sequence', 'sequence_',
+ 'id', 'const','flip',
+ 'until', 'asTypeOf', 'error', 'undefined',
+ 'seq','map','filter', 'head',
+ 'last', 'tail', 'init', 'null', 'length',
+ 'reverse', 'foldl', 'foldl1', 'foldr',
+ 'foldr1', 'and', 'or', 'any', 'all', 'sum',
+ 'product', 'concat', 'concatMap', 'maximum',
+ 'minimum', 'scanl', 'scanl1', 'scanr', 'scanr1',
+ 'iterate', 'repeat', 'cycle', 'take', 'drop',
+ 'splitAt', 'teakWhile', 'dropWhile', 'span',
+ 'break', 'elem', 'notElem', 'lookup', 'zip',
+ 'zip3', 'zipWith', 'zipWith3', 'unzip', 'unzip3',
+ 'lines', 'words', 'unlines',
+ 'unwords', 'showPrec', 'show', 'showList',
+ 'shows', 'showChar', 'showString', 'showParen',
+ 'readsPrec', 'readList', 'reads', 'readParen',
+ 'read', 'lex', 'putChar', 'putStr', 'putStrLn',
+ 'print', 'getChar', 'getLine', 'getContents',
+ 'interact', 'readFile', 'writeFile', 'appendFile',
+ 'readIO', 'readLn', 'ioError', 'userError', 'catch'
+ ),
/* here Prelude Types */
4 => array (
- 'Bool', 'Maybe', 'Either', 'Ord', 'Ordering',
- 'Char', 'String', 'Eq', 'Enum', 'Bounded',
+ 'Bool', 'Maybe', 'Either', 'Ord', 'Ordering',
+ 'Char', 'String', 'Eq', 'Enum', 'Bounded',
'Int', 'Integer', 'Float', 'Double', 'Rational',
- 'Num', 'Real', 'Integral', 'Fractional',
+ 'Num', 'Real', 'Integral', 'Fractional',
'Floating', 'RealFrac', 'RealFloat', 'Monad',
- 'Functor', 'Show', 'ShowS', 'Read', 'ReadS',
+ 'Functor', 'Show', 'ShowS', 'Read', 'ReadS',
'IO'
- ),
+ ),
/* finally Prelude Exceptions */
5 => array (
'IOError', 'IOException'
@@ -122,14 +121,14 @@
),
/* highlighting symbols is really important in Haskell */
'SYMBOLS' => array(
- '|', '->', '<-', '@', '!', '::', '_', '~', '=',
- '&&', '||', '==', '/=', '<', '<=', '>',
- '>=','+', '-', '*','/', '**', '^', '^^',
- '>>=', '>>', '=<<', '$', '.', '$!',
- '++', '!!'
- ),
+ '|', '->', '<-', '@', '!', '::', '_', '~', '=', '?',
+ '&&', '||', '==', '/=', '<', '<=', '>',
+ '>=','+', '-', '*','/', '%', '**', '^', '^^',
+ '>>=', '>>', '=<<', '$', '.', ',', '$!',
+ '++', '!!'
+ ),
'CASE_SENSITIVE' => array(
- GESHI_COMMENTS => true,
+ GESHI_COMMENTS => false,
1 => true,
2 => true, /* functions name are case seinsitive */
3 => true, /* types name too */
@@ -146,9 +145,11 @@
),
'COMMENTS' => array(
1 => 'color: #5d478b; font-style: italic;',
+ 2 => 'color: #339933; font-weight: bold;',
'MULTI' => 'color: #5d478b; font-style: italic;' /* light purpHle */
),
'ESCAPE_CHAR' => array(
+ 0 => 'background-color: #3cb371; font-weight: bold;'
),
'BRACKETS' => array(
0 => 'color: green;'
@@ -164,8 +165,8 @@
),
'REGEXPS' => array(
),
- 'SYMBOLS' => array(
- 0 => 'color: #66cc66; font-weight: bold;'
+ 'SYMBOLS' => array(
+ 0 => 'color: #339933; font-weight: bold;'
),
'SCRIPT' => array(
)
@@ -176,11 +177,11 @@
/* link to the wanted library */
2 => 'http://haskell.org/ghc/docs/latest/html/libraries/base/{FNAME}.html',
/* link to Prelude functions */
- 3 => 'http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:{FNAME}',
+ 3 => 'http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:{FNAME}',
/* link to Prelude types */
- 4 => 'http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t:{FNAME}',
+ 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(