00001 <?php
00002 $BEAUT_PATH = realpath(".")."/syntax_highlight/php";
00003 if (!isset ($BEAUT_PATH)) return;
00004 require_once("$BEAUT_PATH/Beautifier/HFile.php");
00005 class HFile_haskell extends HFile{
00006 function HFile_haskell(){
00007 $this->HFile();
00008
00009
00010
00011
00012
00013
00014 $this->nocase = "0";
00015 $this->notrim = "0";
00016 $this->perl = "0";
00017
00018
00019
00020 $this->colours = array("blue", "purple", "gray", "brown", "blue");
00021 $this->quotecolour = "blue";
00022 $this->blockcommentcolour = "green";
00023 $this->linecommentcolour = "green";
00024
00025
00026
00027 $this->indent = array();
00028 $this->unindent = array();
00029
00030
00031
00032 $this->stringchars = array("\"", "'");
00033 $this->delimiters = array("(", ")", "{", "}", "[", "]", ";", ",", "`", " ", " ");
00034 $this->escchar = "";
00035
00036
00037
00038 $this->linecommenton = array("--");
00039 $this->blockcommenton = array("{-");
00040 $this->blockcommentoff = array("-}");
00041
00042
00043
00044 $this->keywords = array(
00045 "(" => "1",
00046 ")" => "1",
00047 "Addr" => "1",
00048 "EQ" => "1",
00049 "EmptyRec" => "1",
00050 "EmptyRow" => "1",
00051 "Either" => "1",
00052 "False" => "1",
00053 "FilePath" => "1",
00054 "GT" => "1",
00055 "Hugs_Error" => "1",
00056 "Hugs_ExitWith" => "1",
00057 "Hugs_Return" => "1",
00058 "Hugs_SuspendThread" => "1",
00059 "IO" => "1",
00060 "IOError" => "1",
00061 "IOResult" => "1",
00062 "Just" => "1",
00063 "LT" => "1",
00064 "Left" => "1",
00065 "Maybe" => "1",
00066 "Nothing" => "1",
00067 "Ordering" => "1",
00068 "Rec" => "1",
00069 "Right" => "1",
00070 "Ratio" => "1",
00071 "Rational" => "1",
00072 "ST" => "1",
00073 "True" => "1",
00074 "_" => "2",
00075 "=" => "2",
00076 "=>" => "2",
00077 "|" => "2",
00078 "<-" => "2",
00079 "->" => "2",
00080 "," => "2",
00081 ".." => "2",
00082 ":" => "2",
00083 "::" => "2",
00084 "class" => "2",
00085 "case" => "2",
00086 "data" => "2",
00087 "deriving" => "2",
00088 "do" => "2",
00089 "else" => "2",
00090 "import" => "2",
00091 "instance" => "2",
00092 "if" => "2",
00093 "in" => "2",
00094 "let" => "2",
00095 "module" => "2",
00096 "newtype" => "2",
00097 "of" => "2",
00098 "primitive" => "2",
00099 "type" => "2",
00100 "then" => "2",
00101 "where" => "2",
00102 "&&" => "3",
00103 "||" => "3",
00104 "//" => "3",
00105 "/=" => "3",
00106 "/" => "3",
00107 "==" => "3",
00108 "!" => "3",
00109 "!!" => "3",
00110 "+" => "3",
00111 "++" => "3",
00112 "-" => "3",
00113 "*" => "3",
00114 "**" => "3",
00115 "<" => "3",
00116 "<=" => "3",
00117 ">" => "3",
00118 ">>" => "3",
00119 ">>=" => "3",
00120 ">=" => "3",
00121 "abs" => "3",
00122 "absReal" => "3",
00123 "accumulate" => "3",
00124 "acos" => "3",
00125 "acosh" => "3",
00126 "all" => "3",
00127 "and" => "3",
00128 "any" => "3",
00129 "appendFile" => "3",
00130 "applyM" => "3",
00131 "approxRational" => "3",
00132 "asTypeOf" => "3",
00133 "asciiTab" => "3",
00134 "asin" => "3",
00135 "asinh" => "3",
00136 "atan" => "3",
00137 "atan2" => "3",
00138 "atanh" => "3",
00139 "break" => "3",
00140 "catch" => "3",
00141 "ceiling" => "3",
00142 "chr" => "3",
00143 "compare" => "3",
00144 "concat" => "3",
00145 "concatMap" => "3",
00146 "const" => "3",
00147 "cos" => "3",
00148 "cosh" => "3",
00149 "curry" => "3",
00150 "cycle" => "3",
00151 "decodeFloat" => "3",
00152 "denominator" => "3",
00153 "digitToInt" => "3",
00154 "div" => "3",
00155 "divMod" => "3",
00156 "doubleToFloat" => "3",
00157 "doubleToRatio" => "3",
00158 "doubleToRational" => "3",
00159 "drop" => "3",
00160 "dropWhile" => "3",
00161 "either" => "3",
00162 "elem" => "3",
00163 "encodeFloat" => "3",
00164 "enumFrom" => "3",
00165 "enumFromThen" => "3",
00166 "enumFromThenTo" => "3",
00167 "enumFromTo" => "3",
00168 "error" => "3",
00169 "even" => "3",
00170 "exp" => "3",
00171 "exponent" => "3",
00172 "fail" => "3",
00173 "filter" => "3",
00174 "flip" => "3",
00175 "floatDigits" => "3",
00176 "floatProperFraction" => "3",
00177 "floatRadix" => "3",
00178 "floatRange" => "3",
00179 "floatToRational" => "3",
00180 "floor" => "3",
00181 "foldl" => "3",
00182 "foldl\'" => "3",
00183 "foldl1" => "3",
00184 "foldr" => "3",
00185 "foldr1" => "3",
00186 "fromDouble" => "3",
00187 "fromEnum" => "3",
00188 "fromInt" => "3",
00189 "fromInteger" => "3",
00190 "fromIntegral" => "3",
00191 "fromRational" => "3",
00192 "fromRealFrac" => "3",
00193 "fst" => "3",
00194 "gcd" => "3",
00195 "getChar" => "3",
00196 "getContents" => "3",
00197 "getLine" => "3",
00198 "guard" => "3",
00199 "head" => "3",
00200 "hugsIORun" => "3",
00201 "hugsPutStr" => "3",
00202 "id" => "3",
00203 "inRange" => "3",
00204 "index" => "3",
00205 "init" => "3",
00206 "intToDigit" => "3",
00207 "intToRatio" => "3",
00208 "interact" => "3",
00209 "ioeGetErrorString" => "3",
00210 "isAlpha" => "3",
00211 "isAlphanum" => "3",
00212 "isAscii" => "3",
00213 "isControl" => "3",
00214 "isDenormalized" => "3",
00215 "isDigit" => "3",
00216 "isHexDigit" => "3",
00217 "isIEEE" => "3",
00218 "isInfinite" => "3",
00219 "isLower" => "3",
00220 "isNaN" => "3",
00221 "isNegativeZero" => "3",
00222 "isOctDigit" => "3",
00223 "isPrint" => "3",
00224 "isSpace" => "3",
00225 "isUpper" => "3",
00226 "iterate" => "3",
00227 "last" => "3",
00228 "lcm" => "3",
00229 "length" => "3",
00230 "lex" => "3",
00231 "lexDigits" => "3",
00232 "lexLitChar" => "3",
00233 "lexmatch" => "3",
00234 "lines" => "3",
00235 "log" => "3",
00236 "logBase" => "3",
00237 "lookup" => "3",
00238 "map" => "3",
00239 "mapM" => "3",
00240 "mapM_" => "3",
00241 "max" => "3",
00242 "maxBound" => "3",
00243 "maximum" => "3",
00244 "maybe" => "3",
00245 "min" => "3",
00246 "minBound" => "3",
00247 "minimum" => "3",
00248 "mod" => "3",
00249 "negate" => "3",
00250 "nonnull" => "3",
00251 "not" => "3",
00252 "notElem" => "3",
00253 "null" => "3",
00254 "numerator" => "3",
00255 "numericEnumFrom" => "3",
00256 "numericEnumFromThen" => "3",
00257 "numericEnumFromThenTo" => "3",
00258 "numericEnumFromTo" => "3",
00259 "odd" => "3",
00260 "or" => "3",
00261 "ord" => "3",
00262 "otherwise" => "3",
00263 "pi" => "3",
00264 "pred" => "3",
00265 "primAcosDouble" => "3",
00266 "primAcosFloat" => "3",
00267 "primAsinDouble" => "3",
00268 "primAsinFloat" => "3",
00269 "primAtanDouble" => "3",
00270 "primAtanFloat" => "3",
00271 "primCharToInt" => "3",
00272 "primCmpChar" => "3",
00273 "primCmpDouble" => "3",
00274 "primCmpFloat" => "3",
00275 "primCmpInt" => "3",
00276 "primCmpInteger" => "3",
00277 "primCompAux" => "3",
00278 "primCosDouble" => "3",
00279 "primCosFloat" => "3",
00280 "primDivDouble" => "3",
00281 "primDivFloat" => "3",
00282 "primDivInt" => "3",
00283 "primDoubleDecode" => "3",
00284 "primDoubleDigits" => "3",
00285 "primDoubleEncode" => "3",
00286 "primDoubleMaxExp" => "3",
00287 "primDoubleMinExp" => "3",
00288 "primDoubleRadix" => "3",
00289 "primEqChar" => "3",
00290 "primEqDouble" => "3",
00291 "primEqFloat" => "3",
00292 "primEqInt" => "3",
00293 "primEqInteger" => "3",
00294 "primEvenInt" => "3",
00295 "primEvenInteger" => "3",
00296 "primExitWith" => "3",
00297 "primExpDouble" => "3",
00298 "primExpFloat" => "3",
00299 "primFloatDecode" => "3",
00300 "primFloatDigits" => "3",
00301 "primFloatEncode" => "3",
00302 "primFloatMaxExp" => "3",
00303 "primFloatMinExp" => "3",
00304 "primFloatRadix" => "3",
00305 "primIntToChar" => "3",
00306 "primIntToDouble" => "3",
00307 "primIntToFloat" => "3",
00308 "primIntToInteger" => "3",
00309 "primIntegerToDouble" => "3",
00310 "primIntegerToFloat" => "3",
00311 "primIntegerToInt" => "3",
00312 "primLogDouble" => "3",
00313 "primLogFloat" => "3",
00314 "primMaxInt" => "3",
00315 "primMinInt" => "3",
00316 "primMinusDouble" => "3",
00317 "primMinusFloat" => "3",
00318 "primMinusInt" => "3",
00319 "primMinusInteger" => "3",
00320 "primModInt" => "3",
00321 "primMulDouble" => "3",
00322 "primMulFloat" => "3",
00323 "primMulInt" => "3",
00324 "primMulInteger" => "3",
00325 "primNegDouble" => "3",
00326 "primNegFloat" => "3",
00327 "primNegInt" => "3",
00328 "primNegInteger" => "3",
00329 "primPiDouble" => "3",
00330 "primPiFloat" => "3",
00331 "primPlusDouble" => "3",
00332 "primPlusFloat" => "3",
00333 "primPlusInt" => "3",
00334 "primPlusInteger" => "3",
00335 "primPmFlt" => "3",
00336 "primPmInt" => "3",
00337 "primPmInteger" => "3",
00338 "primPmNpk" => "3",
00339 "primPmSub" => "3",
00340 "primQrmInt" => "3",
00341 "primQrmInteger" => "3",
00342 "primQuotInt" => "3",
00343 "primRationalToDouble" => "3",
00344 "primRationalToFloat" => "3",
00345 "primRemInt" => "3",
00346 "primShowsDouble" => "3",
00347 "primShowsFloat" => "3",
00348 "primShowsInt" => "3",
00349 "primShowsInteger" => "3",
00350 "primSinDouble" => "3",
00351 "primSinFloat" => "3",
00352 "primSqrtDouble" => "3",
00353 "primSqrtFloat" => "3",
00354 "primTanDouble" => "3",
00355 "primTanFloat" => "3",
00356 "primbindIO" => "3",
00357 "primretIO" => "3",
00358 "print" => "3",
00359 "product" => "3",
00360 "properFraction" => "3",
00361 "protectEsc" => "3",
00362 "putChar" => "3",
00363 "putStr" => "3",
00364 "putStrLn" => "3",
00365 "quot" => "3",
00366 "quotRem" => "3",
00367 "range" => "3",
00368 "rangeSize" => "3",
00369 "rationalToDouble" => "3",
00370 "rationalToFloat" => "3",
00371 "rationalToRealFloat" => "3",
00372 "read" => "3",
00373 "readDec" => "3",
00374 "readField" => "3",
00375 "readFile" => "3",
00376 "readFloat" => "3",
00377 "readHex" => "3",
00378 "readIO" => "3",
00379 "readInt" => "3",
00380 "readList" => "3",
00381 "readLitChar" => "3",
00382 "readLn" => "3",
00383 "readOct" => "3",
00384 "readParen" => "3",
00385 "readSigned" => "3",
00386 "reads" => "3",
00387 "readsPrec" => "3",
00388 "realFloatToRational" => "3",
00389 "recip" => "3",
00390 "reduce" => "3",
00391 "rem" => "3",
00392 "repeat" => "3",
00393 "replicate" => "3",
00394 "return" => "3",
00395 "reverse" => "3",
00396 "round" => "3",
00397 "scaleFloat" => "3",
00398 "scanl" => "3",
00399 "scanl1" => "3",
00400 "scanr" => "3",
00401 "scanr1" => "3",
00402 "seq" => "3",
00403 "sequence" => "3",
00404 "show" => "3",
00405 "showChar" => "3",
00406 "showField" => "3",
00407 "showInt" => "3",
00408 "showList" => "3",
00409 "showLitChar" => "3",
00410 "showParen" => "3",
00411 "showSigned" => "3",
00412 "showString" => "3",
00413 "shows" => "3",
00414 "showsPrec" => "3",
00415 "significand" => "3",
00416 "signum" => "3",
00417 "signumReal" => "3",
00418 "sin" => "3",
00419 "sinh" => "3",
00420 "snd" => "3",
00421 "span" => "3",
00422 "splitAt" => "3",
00423 "sqrt" => "3",
00424 "strict" => "3",
00425 "subtract" => "3",
00426 "succ" => "3",
00427 "sum" => "3",
00428 "tail" => "3",
00429 "take" => "3",
00430 "takeWhile" => "3",
00431 "tan" => "3",
00432 "tanh" => "3",
00433 "toEnum" => "3",
00434 "toInt" => "3",
00435 "toInteger" => "3",
00436 "toLower" => "3",
00437 "toRational" => "3",
00438 "toUpper" => "3",
00439 "truncate" => "3",
00440 "uncurry" => "3",
00441 "undefined" => "3",
00442 "unlines" => "3",
00443 "until" => "3",
00444 "unwords" => "3",
00445 "unzip" => "3",
00446 "unzip3" => "3",
00447 "userError" => "3",
00448 "words" => "3",
00449 "writeFile" => "3",
00450 "zero" => "3",
00451 "zip" => "3",
00452 "zip3" => "3",
00453 "zipWith" => "3",
00454 "zipWith3" => "3",
00455 "Bool" => "4",
00456 "Char" => "4",
00457 "Float" => "4",
00458 "Int" => "4",
00459 "Integer" => "4",
00460 "Long" => "4",
00461 "String" => "4",
00462 "Bounded" => "5",
00463 "Double" => "5",
00464 "Enum" => "5",
00465 "Eq" => "5",
00466 "Eval" => "5",
00467 "Functor" => "5",
00468 "Fractional" => "5",
00469 "Floating" => "5",
00470 "Ix" => "5",
00471 "Integral" => "5",
00472 "Monad" => "5",
00473 "MonadZero" => "5",
00474 "MonadPlus" => "5",
00475 "Num" => "5",
00476 "Ord" => "5",
00477 "Read" => "5",
00478 "Real" => "5",
00479 "RealFrac" => "5",
00480 "RealFloat" => "5",
00481 "Show" => "5",
00482 "Void" => "5");
00483
00484
00485
00486
00487
00488
00489
00490
00491 $this->linkscripts = array(
00492 "1" => "donothing",
00493 "2" => "donothing",
00494 "3" => "donothing",
00495 "4" => "donothing",
00496 "5" => "donothing");
00497 }
00498
00499
00500 function donothing($keywordin)
00501 {
00502 return $keywordin;
00503 }
00504
00505 }?>