41 |
39 |
42 $language_data = array ( |
40 $language_data = array ( |
43 'LANG_NAME' => 'Haskell', |
41 'LANG_NAME' => 'Haskell', |
44 'COMMENT_SINGLE' => array( 1 => '--'), |
42 'COMMENT_SINGLE' => array( 1 => '--'), |
45 'COMMENT_MULTI' => array('{-' => '-}'), |
43 'COMMENT_MULTI' => array('{-' => '-}'), |
|
44 'COMMENT_REGEXP' => array(2 => "/-->/"), |
46 'CASE_KEYWORDS' => 0, |
45 'CASE_KEYWORDS' => 0, |
47 'QUOTEMARKS' => array('"'), |
46 'QUOTEMARKS' => array('"'), |
48 'ESCAPE_CHAR' => "\\", |
47 'ESCAPE_CHAR' => "\\", |
49 'KEYWORDS' => array( |
48 'KEYWORDS' => array( |
50 /* main haskell keywords */ |
49 /* main haskell keywords */ |
51 1 => array( |
50 1 => array( |
52 'as', |
51 'as', |
53 'case', 'of', 'class', 'data', 'default', |
52 'case', 'of', 'class', 'data', 'default', |
54 'deriving', 'do', 'forall', 'hiding', 'if', 'then', |
53 'deriving', 'do', 'forall', 'hiding', 'if', 'then', |
55 'else', 'import', 'infix', 'infixl', 'infixr', |
54 'else', 'import', 'infix', 'infixl', 'infixr', |
56 'instance', 'let', 'in', 'module', 'newtype', |
55 'instance', 'let', 'in', 'module', 'newtype', |
57 'qualified', 'type', 'where' |
56 'qualified', 'type', 'where' |
58 ), |
57 ), |
59 /* define names of main librarys, so we can link to it */ |
58 /* define names of main librarys, so we can link to it */ |
60 2 => array( |
59 2 => array( |
61 'Foreign', 'Numeric', 'Prelude' |
60 'Foreign', 'Numeric', 'Prelude' |
62 ), |
61 ), |
63 /* just link to Prelude functions, cause it's the default opened library when starting Haskell */ |
62 /* just link to Prelude functions, cause it's the default opened library when starting Haskell */ |
64 3 => array( |
63 3 => array( |
65 'not', 'otherwise', 'maybe', |
64 'not', 'otherwise', 'maybe', |
66 'either', 'fst', 'snd', 'curry', 'uncurry', |
65 'either', 'fst', 'snd', 'curry', 'uncurry', |
67 'compare', |
66 'compare', |
68 'max', 'min', 'succ', 'pred', 'toEnum', 'fromEnum', |
67 'max', 'min', 'succ', 'pred', 'toEnum', 'fromEnum', |
69 'enumFrom', 'enumFromThen', 'enumFromTo', |
68 'enumFrom', 'enumFromThen', 'enumFromTo', |
70 'enumFromThenTo', 'minBound', 'maxBound', |
69 'enumFromThenTo', 'minBound', 'maxBound', |
71 'negate', 'abs', 'signum', |
70 'negate', 'abs', 'signum', |
72 'fromInteger', 'toRational', 'quot', 'rem', |
71 'fromInteger', 'toRational', 'quot', 'rem', |
73 'div', 'mod', 'quotRem', 'divMod', 'toInteger', |
72 'div', 'mod', 'quotRem', 'divMod', 'toInteger', |
74 'recip', 'fromRational', 'pi', 'exp', |
73 'recip', 'fromRational', 'pi', 'exp', |
75 'log', 'sqrt', 'logBase', 'sin', 'cos', |
74 'log', 'sqrt', 'logBase', 'sin', 'cos', |
76 'tan', 'asin', 'acos', 'atan', 'sinh', 'cosh', |
75 'tan', 'asin', 'acos', 'atan', 'sinh', 'cosh', |
77 'tanh', 'asinh', 'acosh', 'atanh', |
76 'tanh', 'asinh', 'acosh', 'atanh', |
78 'properFraction', 'truncate', 'round', 'ceiling', |
77 'properFraction', 'truncate', 'round', 'ceiling', |
79 'floor', 'floatRadix', 'floatDigits', 'floatRange', |
78 'floor', 'floatRadix', 'floatDigits', 'floatRange', |
80 'decodeFloat', 'encodeFloat', 'exponent', |
79 'decodeFloat', 'encodeFloat', 'exponent', |
81 'significand', 'scaleFloat', 'isNaN', 'isInfinite', |
80 'significand', 'scaleFloat', 'isNaN', 'isInfinite', |
82 'isDenomalized', 'isNegativeZero', 'isIEEE', |
81 'isDenomalized', 'isNegativeZero', 'isIEEE', |
83 'atan2', 'subtract', 'even', 'odd', 'gcd', |
82 'atan2', 'subtract', 'even', 'odd', 'gcd', |
84 'lcm', 'fromIntegral', 'realToFrac', |
83 'lcm', 'fromIntegral', 'realToFrac', |
85 'return', 'fail', 'fmap', |
84 'return', 'fail', 'fmap', |
86 'mapM', 'mapM_', 'sequence', 'sequence_', |
85 'mapM', 'mapM_', 'sequence', 'sequence_', |
87 'id', 'const','flip', |
86 'id', 'const','flip', |
88 'until', 'asTypeOf', 'error', 'undefined', |
87 'until', 'asTypeOf', 'error', 'undefined', |
89 'seq','map','filter', 'head', |
88 'seq','map','filter', 'head', |
90 'last', 'tail', 'init', 'null', 'length', |
89 'last', 'tail', 'init', 'null', 'length', |
91 'reverse', 'foldl', 'foldl1', 'foldr', |
90 'reverse', 'foldl', 'foldl1', 'foldr', |
92 'foldr1', 'and', 'or', 'any', 'all', 'sum', |
91 'foldr1', 'and', 'or', 'any', 'all', 'sum', |
93 'product', 'concat', 'concatMap', 'maximum', |
92 'product', 'concat', 'concatMap', 'maximum', |
94 'minimum', 'scanl', 'scanl1', 'scanr', 'scanr1', |
93 'minimum', 'scanl', 'scanl1', 'scanr', 'scanr1', |
95 'iterate', 'repeat', 'cycle', 'take', 'drop', |
94 'iterate', 'repeat', 'cycle', 'take', 'drop', |
96 'splitAt', 'teakWhile', 'dropWhile', 'span', |
95 'splitAt', 'teakWhile', 'dropWhile', 'span', |
97 'break', 'elem', 'notElem', 'lookup', 'zip', |
96 'break', 'elem', 'notElem', 'lookup', 'zip', |
98 'zip3', 'zipWith', 'zipWith3', 'unzip', 'unzip3', |
97 'zip3', 'zipWith', 'zipWith3', 'unzip', 'unzip3', |
99 'unzip', 'unzip3', 'lines', 'words', 'unlines', |
98 'lines', 'words', 'unlines', |
100 'unwords', 'showPrec', 'show', 'showList', |
99 'unwords', 'showPrec', 'show', 'showList', |
101 'shows', 'showChar', 'showString', 'showParen', |
100 'shows', 'showChar', 'showString', 'showParen', |
102 'readsPrec', 'readList', 'reads', 'readParen', |
101 'readsPrec', 'readList', 'reads', 'readParen', |
103 'read', 'lex', 'putChar', 'putStr', 'putStrLn', |
102 'read', 'lex', 'putChar', 'putStr', 'putStrLn', |
104 'print', 'getChar', 'getLine', 'getContents', |
103 'print', 'getChar', 'getLine', 'getContents', |
105 'interact', 'readFile', 'writeFile', 'appendFile', |
104 'interact', 'readFile', 'writeFile', 'appendFile', |
106 'readIO', 'readLn', 'ioError', 'userError', 'catch' |
105 'readIO', 'readLn', 'ioError', 'userError', 'catch' |
107 ), |
106 ), |
108 /* here Prelude Types */ |
107 /* here Prelude Types */ |
109 4 => array ( |
108 4 => array ( |
110 'Bool', 'Maybe', 'Either', 'Ord', 'Ordering', |
109 'Bool', 'Maybe', 'Either', 'Ord', 'Ordering', |
111 'Char', 'String', 'Eq', 'Enum', 'Bounded', |
110 'Char', 'String', 'Eq', 'Enum', 'Bounded', |
112 'Int', 'Integer', 'Float', 'Double', 'Rational', |
111 'Int', 'Integer', 'Float', 'Double', 'Rational', |
113 'Num', 'Real', 'Integral', 'Fractional', |
112 'Num', 'Real', 'Integral', 'Fractional', |
114 'Floating', 'RealFrac', 'RealFloat', 'Monad', |
113 'Floating', 'RealFrac', 'RealFloat', 'Monad', |
115 'Functor', 'Show', 'ShowS', 'Read', 'ReadS', |
114 'Functor', 'Show', 'ShowS', 'Read', 'ReadS', |
116 'IO' |
115 'IO' |
117 ), |
116 ), |
118 /* finally Prelude Exceptions */ |
117 /* finally Prelude Exceptions */ |
119 5 => array ( |
118 5 => array ( |
120 'IOError', 'IOException' |
119 'IOError', 'IOException' |
121 ) |
120 ) |
122 ), |
121 ), |
123 /* highlighting symbols is really important in Haskell */ |
122 /* highlighting symbols is really important in Haskell */ |
124 'SYMBOLS' => array( |
123 'SYMBOLS' => array( |
125 '|', '->', '<-', '@', '!', '::', '_', '~', '=', |
124 '|', '->', '<-', '@', '!', '::', '_', '~', '=', '?', |
126 '&&', '||', '==', '/=', '<', '<=', '>', |
125 '&&', '||', '==', '/=', '<', '<=', '>', |
127 '>=','+', '-', '*','/', '**', '^', '^^', |
126 '>=','+', '-', '*','/', '%', '**', '^', '^^', |
128 '>>=', '>>', '=<<', '$', '.', '$!', |
127 '>>=', '>>', '=<<', '$', '.', ',', '$!', |
129 '++', '!!' |
128 '++', '!!' |
130 ), |
129 ), |
131 'CASE_SENSITIVE' => array( |
130 'CASE_SENSITIVE' => array( |
132 GESHI_COMMENTS => true, |
131 GESHI_COMMENTS => false, |
133 1 => true, |
132 1 => true, |
134 2 => true, /* functions name are case seinsitive */ |
133 2 => true, /* functions name are case seinsitive */ |
135 3 => true, /* types name too */ |
134 3 => true, /* types name too */ |
136 4 => true, /* finally exceptions too */ |
135 4 => true, /* finally exceptions too */ |
137 5 => true |
136 5 => true |