haskell.php

gehe zur Dokumentation dieser Datei
00001 <?php
00002 /*************************************************************************************
00003  * haskell.php
00004  * ----------
00005  * Author: Jason Dagit (dagit@codersbase.com) based on ocaml.php by Flaie (fireflaie@gmail.com) 
00006  * Copyright: (c) 2005 Flaie, Nigel McNie (http://qbnz.com/highlighter)
00007  * Release Version: 1.0.7.20
00008  * CVS Revision Version: $Revision$
00009  * Date Started: 2005/08/27
00010  * Last Modified: $Date$
00011  *
00012  * Haskell language file for GeSHi.
00013  *
00014  * CHANGES
00015  * -------
00016  * 2005/08/27 (1.0.0)
00017  *   -  First Release
00018  *
00019  * TODO (updated 2005/08/27)
00020  * -------------------------
00021  *
00022  *************************************************************************************
00023  *
00024  *   This file is part of GeSHi.
00025  *
00026  *   GeSHi is free software; you can redistribute it and/or modify
00027  *   it under the terms of the GNU General Public License as published by
00028  *   the Free Software Foundation; either version 2 of the License, or
00029  *   (at your option) any later version.
00030  *
00031  *   GeSHi is distributed in the hope that it will be useful,
00032  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00033  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00034  *   GNU General Public License for more details.
00035  *
00036  *   You should have received a copy of the GNU General Public License
00037  *   along with GeSHi; if not, write to the Free Software
00038  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00039  *
00040  ************************************************************************************/
00041 
00042 $language_data = array (
00043     'LANG_NAME' => 'Haskell',
00044     'COMMENT_SINGLE' => array( 1 => '--'),
00045     'COMMENT_MULTI' => array('{-' => '-}'),
00046     'CASE_KEYWORDS' => 0,
00047     'QUOTEMARKS' => array('"'),
00048     'ESCAPE_CHAR' => "\\",
00049     'KEYWORDS' => array(
00050        /* main haskell keywords */
00051         1 => array(
00052            'as',
00053            'case', 'of', 'class', 'data', 'default', 
00054            'deriving', 'do', 'forall', 'hiding', 'if', 'then',
00055            'else', 'import', 'infix', 'infixl', 'infixr', 
00056            'instance', 'let', 'in', 'module', 'newtype',
00057            'qualified', 'type', 'where'
00058             ),
00059         /* define names of main librarys, so we can link to it */
00060         2 => array(
00061            'Foreign', 'Numeric', 'Prelude'
00062            ),
00063         /* just link to Prelude functions, cause it's the default opened library when starting Haskell */
00064         3 => array(
00065            'not', 'otherwise', 'maybe', 
00066            'either', 'fst', 'snd', 'curry', 'uncurry',
00067            'compare', 
00068            'max', 'min', 'succ', 'pred', 'toEnum', 'fromEnum',
00069            'enumFrom', 'enumFromThen', 'enumFromTo', 
00070            'enumFromThenTo', 'minBound', 'maxBound',
00071            'negate', 'abs', 'signum',
00072            'fromInteger', 'toRational', 'quot', 'rem',
00073            'div', 'mod', 'quotRem', 'divMod', 'toInteger',
00074            'recip', 'fromRational', 'pi', 'exp',
00075            'log', 'sqrt', 'logBase', 'sin', 'cos',
00076            'tan', 'asin', 'acos', 'atan', 'sinh', 'cosh',
00077            'tanh', 'asinh', 'acosh', 'atanh',
00078            'properFraction', 'truncate', 'round', 'ceiling',
00079            'floor', 'floatRadix', 'floatDigits', 'floatRange',
00080            'decodeFloat', 'encodeFloat', 'exponent',
00081            'significand', 'scaleFloat', 'isNaN', 'isInfinite',
00082            'isDenomalized', 'isNegativeZero', 'isIEEE',
00083            'atan2', 'subtract', 'even', 'odd', 'gcd',
00084            'lcm', 'fromIntegral', 'realToFrac',
00085            'return', 'fail', 'fmap',
00086            'mapM', 'mapM_', 'sequence', 'sequence_',
00087            'id', 'const','flip',
00088            'until', 'asTypeOf', 'error', 'undefined',
00089            'seq','map','filter', 'head',
00090            'last', 'tail', 'init', 'null', 'length',
00091            'reverse', 'foldl', 'foldl1', 'foldr',
00092            'foldr1', 'and', 'or', 'any', 'all', 'sum',
00093            'product', 'concat', 'concatMap', 'maximum',
00094            'minimum', 'scanl', 'scanl1', 'scanr', 'scanr1',
00095            'iterate', 'repeat', 'cycle', 'take', 'drop',
00096            'splitAt', 'teakWhile', 'dropWhile', 'span',
00097            'break', 'elem', 'notElem', 'lookup', 'zip',
00098            'zip3', 'zipWith', 'zipWith3', 'unzip', 'unzip3',
00099            'unzip', 'unzip3', 'lines', 'words', 'unlines',
00100            'unwords', 'showPrec', 'show', 'showList',
00101            'shows', 'showChar', 'showString', 'showParen',
00102            'readsPrec', 'readList', 'reads', 'readParen',
00103            'read', 'lex', 'putChar', 'putStr', 'putStrLn',
00104            'print', 'getChar', 'getLine', 'getContents',
00105            'interact', 'readFile', 'writeFile', 'appendFile',
00106            'readIO', 'readLn', 'ioError', 'userError', 'catch'
00107            ),
00108         /* here Prelude Types */
00109         4 => array (
00110             'Bool', 'Maybe', 'Either', 'Ord', 'Ordering', 
00111             'Char', 'String', 'Eq', 'Enum', 'Bounded', 
00112             'Int', 'Integer', 'Float', 'Double', 'Rational',
00113             'Num', 'Real', 'Integral', 'Fractional', 
00114             'Floating', 'RealFrac', 'RealFloat', 'Monad',
00115             'Functor', 'Show', 'ShowS', 'Read', 'ReadS', 
00116             'IO'
00117            ),
00118         /* finally Prelude Exceptions */
00119         5 => array (
00120             'IOError', 'IOException'
00121             )
00122         ),
00123     /* highlighting symbols is really important in Haskell */
00124     'SYMBOLS' => array(
00125            '|', '->', '<-', '@', '!', '::', '_', '~', '=',
00126            '&&', '||', '==', '/=', '<', '<=', '>', 
00127            '>=','+', '-', '*','/',  '**', '^', '^^', 
00128            '>>=', '>>', '=<<',  '$', '.',  '$!',  
00129            '++', '!!'
00130             ), 
00131     'CASE_SENSITIVE' => array(
00132         GESHI_COMMENTS => true,
00133         1 => true,
00134         2 => true, /* functions name are case seinsitive */
00135         3 => true, /* types name too */
00136         4 => true, /* finally exceptions too */
00137         5 => true
00138         ),
00139     'STYLES' => array(
00140         'KEYWORDS' => array(
00141             1 => 'color: #06c; font-weight: bold;', /* nice blue */
00142             2 => 'color: #06c; font-weight: bold;', /* blue as well */
00143             3 => 'font-weight: bold;', /* make the preduled functions bold */
00144             4 => 'color: #cccc00; font-weight: bold;', /* give types a different bg */
00145             5 => 'color: maroon;'
00146             ),
00147         'COMMENTS' => array(
00148             1 => 'color: #5d478b; font-style: italic;',
00149             'MULTI' => 'color: #5d478b; font-style: italic;' /* light purpHle */
00150             ),
00151         'ESCAPE_CHAR' => array(
00152             ),
00153         'BRACKETS' => array(
00154             0 => 'color: green;'
00155             ),
00156         'STRINGS' => array(
00157             0 => 'background-color: #3cb371;' /* nice green */
00158             ),
00159         'NUMBERS' => array(
00160             0 => 'color: red;' /* pink */
00161             ),
00162         'METHODS' => array(
00163             1 => 'color: #060;' /* dark green */
00164             ),
00165         'REGEXPS' => array(
00166             ),
00167         'SYMBOLS' => array( 
00168             0 => 'color: #66cc66; font-weight: bold;'
00169             ),
00170         'SCRIPT' => array(
00171             )
00172         ),
00173     'URLS' => array(
00174         /* some of keywords are Prelude functions */
00175         1 => '',
00176         /* link to the wanted library */
00177         2 => 'http://haskell.org/ghc/docs/latest/html/libraries/base/{FNAME}.html',
00178         /* link to Prelude functions */
00179         3 => 'http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:{FNAME}', 
00180         /* link to Prelude types */
00181         4 => 'http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t:{FNAME}', 
00182         /* link to Prelude exceptions */
00183         5 => 'http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t:{FNAME}', 
00184         ),
00185     'OOLANG' => false,
00186     'OBJECT_SPLITTERS' => array(
00187         ),
00188     'REGEXPS' => array(
00189         ),
00190     'STRICT_MODE_APPLIES' => GESHI_NEVER,
00191     'SCRIPT_DELIMITERS' => array(
00192         ),
00193     'HIGHLIGHT_STRICT_BLOCK' => array(
00194         )
00195 );
00196 
00197 ?>

Erzeugt am Thu May 14 00:55:48 2009 für OpenRat von  doxygen 1.5.8