'*******************************************************************************
' EverEdit Syntax File
' Language:    Haskell
' Maintainer:  www.everedit.net
' History:
'   2015/06/24 First Version
'*******************************************************************************
Include( ".\const.mac" )

Set hk=CreateParser()

'string
Set rString2=hk.CreateStringRegion( COLOR_STRING2, """", "\", False, "\" )
hk.AddRegion( rString2 )

'comment
Set rLineComment=hk.CreateRegion( COLOR_COMMENT1, "+--+", "$", True )
Set rBlockComment=hk.CreateRegion( COLOR_COMMENT2, "+{-+", "+-}+", True )
hk.AddRegion( rLineComment )
hk.AddRegion( rBlockComment )

'Some words with title case
hk.AddItem( hk.CreateItem(COLOR_NUMBER, "\b[A-Z]+[a-z0-9_]*", True ) )

'words
hk.AddWord( hk.CreateWord(COLOR_WORD1, "case class data deriving do else if import in instance let module newtype of primitive then type where", True ) )

hk.AddWord( hk.CreateWord(COLOR_WORD2, "Addr AppendMode Either EmptyRec EmptyRow EQ False FilePath GT Hugs_Error Hugs_ExitWith Hugs_Return Hugs_SuspendThread IOError IOResult Just Left LT Maybe Nothing Ordering Ratio Rational ReadMode Rec Right ST True WriteMode", True ) )

hk.AddWord( hk.CreateWord(COLOR_WORD3, "abs absReal accept accumulate acos acosh all and any appendFile appendText applyM approxRational asciiTab asin asinh asTypeOf atan atan2 atanh break button catch ceiling colorDialog compare concat concatMap connectTo const cos cosh curry cycle decodeFloat denominator digitToInt div divMod doubleToFloat doubleToRatio doubleToRational drop dropWhile either elem encodeFloat enumFrom enumFromThen enumFromThenTo enumFromTo error even exp exponent fail filter flip floatDigits floatProperFraction floatRadix floatRange floatToDigits floatToRational floor foldl foldl' foldl1 foldr foldr1 fontDialog forkIO forkOS frameFixed fromDouble fromEnum fromInt fromInteger fromIntegral fromRat fromRational fromRealFrac fst gcd get getArgs getChar getClockTime getContents getHostByName getLine getProgName guard hClose head hFlush hGetContents hGetLine hostAddresses hPutStr hPutStrLn hReady hugsIORun hugsPutStr id index inet_ntoa init inRange interact intToDigit intToRatio ioeGetErrorString isAlpha isAlphanum isAscii isControl isDenormalized isDigit isEmptyMVar isHexDigit isIEEE isInfinite isLower isNaN isNegativeZero isOctDigit isPrint isSpace isUpper iterate last lcm length lex lexDigits lexLitChar lexmatch lines listenOn log logBase logMessage lookup main map mapM mapM_ max maxBound maximum maybe min minBound minimum mod negate newEmptyMVar newMVar nonnull not notElem null numerator numericEnumFrom numericEnumFromThen numericEnumFromThenTo numericEnumFromTo odd openDir openFile or otherwise pi pred primAcosDouble primAcosFloat primAsinDouble primAsinFloat primAtanDouble primAtanFloat primbindIO primCharToInt primCmpChar primCmpDouble primCmpFloat primCmpInt primCmpInteger primCompAux primCosDouble primCosFloat primDivDouble primDivFloat primDivInt primDoubleDecode primDoubleDigits primDoubleEncode primDoubleMaxExp primDoubleMinExp primDoubleRadix primEqChar primEqDouble primEqFloat primEqInt primEqInteger primEvenInt primEvenInteger primExitWith primExpDouble primExpFloat primFloatDecode primFloatDigits primFloatEncode primFloatMaxExp primFloatMinExp primFloatRadix primIntegerToDouble primIntegerToFloat primIntegerToInt primIntToChar primIntToDouble primIntToFloat primIntToInteger primLogDouble primLogFloat primMaxInt primMinInt primMinusDouble primMinusFloat primMinusInt primMinusInteger primModInt primMulDouble primMulFloat primMulInt primMulInteger primNegDouble primNegFloat primNegInt primNegInteger primPiDouble primPiFloat primPlusDouble primPlusFloat primPlusInt primPlusInteger primPmFlt primPmInt primPmInteger primPmNpk primPmSub primQrmInt primQrmInteger primQuotInt primRationalToDouble primRationalToFloat primRemInt primretIO primShowsDouble primShowsFloat primShowsInt primShowsInteger primSinDouble primSinFloat primSqrtDouble primSqrtFloat primTanDouble primTanFloat print product properFraction protectEsc putChar putMVar putStr putStrLn quot quotRem range rangeSize rationalToDouble rationalToFloat rationalToRealFloat read readDec readField readFile readFloat readHex readInt readIO readList readLitChar readLn readMVar readOct readParen reads readSigned readsPrec realFloatToRational realToFrac recip reduce rem repeat replicate return reverse round scaleFloat scanl scanl1 scanr scanr1 seq sequence sequence_ set show showChar showEFloat showFFloat showField showFloat showGFloat showHex showInt showIntAtBase showList showLitChar showOct showParen shows showSigned showsPrec showString significand signum signumReal sin sinh snd span splitAt sqrt start staticText strict subtract succ sum swapMVar tail take takeMVar takeWhile tan tanh textCtrlAppendText textCtrlRich textCtrlSetEditable textEntry threadDelay throw toCalendarTime toEnum toInt toInteger toLower toRational toUpper truncate try tryPutMVar tryTakeMVar uncurry undefined unlines until unwords unzip unzip3 userError varCreate varGet withSocketsDo words writeFile zero zip zip3 zipWith zipWith3", True ) )

hk.AddWord( hk.CreateWord(COLOR_WORD4, "bgcolor Bool Bounded brushColor brushKind Char ctDay ctHour ctMin ctMonth ctSec ctYear defaultButton Double enabled Enum Eq Eval Float Floating font Fractional Functor Handle Int Integer Integral interval items Ix layout Long menuBar Monad MonadPlus MonadZero Num Ord processEnter Rational Read Real RealFloat RealFrac selection Show sorted statusWidth String text textBgcolor textColor tooltip Void wrap", True ) )


hk.AddItem( hk.CreateItem(COLOR_OPERATOR, "[\$\{\}\(\)\+\-\*\\=%&\^!~\|<>?\.,:;\/\[\]]",False ) )
hk.AddItem( hk.CreateItem(COLOR_NUMBER, "\b\d+\b", False) )

hk.CommentLine "--"
hk.CommentBlock "{-", "-}"

hk.SetPairs( "[]{}()""""" )
