<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language name="Haskell" version="2.4" kateversion="2.3" section="Sources" extensions="*.hs;*.chs" mimetype="text/x-haskell" author="Nicolas Wu (zenzike@gmail.com)" license="LGPL" indenter="haskell" style="haskell">
  <highlighting>
  <list name="keywords">
    <item> case </item>
    <item> class </item>
    <item> data </item>
    <item> deriving </item>
    <item> do </item>
    <item> else </item>
    <item> if </item>
    <item> in </item>
    <item> infixl </item>
    <item> infixr </item>
    <item> instance </item>
    <item> let </item>
    <item> module </item>
    <item> newtype </item>
    <item> of </item>
    <item> primitive </item>
    <item> then </item>
    <item> type </item>
    <item> where </item>
  </list>
  <list name="prelude function">
    <item> FilePath </item>
    <item> IOError </item>
    <item> abs </item>
    <item> acos </item>
    <item> acosh </item>
    <item> all </item>
    <item> and </item>
    <item> any </item>
    <item> appendFile </item>
    <item> approxRational </item>
    <item> asTypeOf </item>
    <item> asin </item>
    <item> asinh </item>
    <item> atan </item>
    <item> atan2 </item>
    <item> atanh </item>
    <item> basicIORun </item>
    <item> break </item>
    <item> catch </item>
    <item> ceiling </item>
    <item> chr </item>
    <item> compare </item>
    <item> concat </item>
    <item> concatMap </item>
    <item> const </item>
    <item> cos </item>
    <item> cosh </item>
    <item> curry </item>
    <item> cycle </item>
    <item> decodeFloat </item>
    <item> denominator </item>
    <item> digitToInt </item>
    <item> div </item>
    <item> divMod </item>
    <item> drop </item>
    <item> dropWhile </item>
    <item> either </item>
    <item> elem </item>
    <item> encodeFloat </item>
    <item> enumFrom </item>
    <item> enumFromThen </item>
    <item> enumFromThenTo </item>
    <item> enumFromTo </item>
    <item> error </item>
    <item> even </item>
    <item> exp </item>
    <item> exponent </item>
    <item> fail </item>
    <item> filter </item>
    <item> flip </item>
    <item> floatDigits </item>
    <item> floatRadix </item>
    <item> floatRange </item>
    <item> floor </item>
    <item> fmap </item>
    <item> foldl </item>
    <item> foldl1 </item>
    <item> foldr </item>
    <item> foldr1 </item>
    <item> fromDouble </item>
    <item> fromEnum </item>
    <item> fromInt </item>
    <item> fromInteger </item>
    <item> fromIntegral </item>
    <item> fromRational </item>
    <item> fst </item>
    <item> gcd </item>
    <item> getChar </item>
    <item> getContents </item>
    <item> getLine </item>
    <item> group </item>
    <item> head </item>
    <item> id </item>
    <item> inRange </item>
    <item> index </item>
    <item> init </item>
    <item> intToDigit </item>
    <item> interact </item>
    <item> ioError </item>
    <item> isAlpha </item>
    <item> isAlphaNum </item>
    <item> isAscii </item>
    <item> isControl </item>
    <item> isDenormalized </item>
    <item> isDigit </item>
    <item> isHexDigit </item>
    <item> isIEEE </item>
    <item> isInfinite </item>
    <item> isLower </item>
    <item> isNaN </item>
    <item> isNegativeZero </item>
    <item> isOctDigit </item>
    <item> isPrint </item>
    <item> isSpace </item>
    <item> isUpper </item>
    <item> iterate </item>
    <item> last </item>
    <item> lcm </item>
    <item> length </item>
    <item> lex </item>
    <item> lexDigits </item>
    <item> lexLitChar </item>
    <item> lines </item>
    <item> log </item>
    <item> logBase </item>
    <item> lookup </item>
    <item> map </item>
    <item> mapM </item>
    <item> mapM_ </item>
    <item> max </item>
    <item> maxBound </item>
    <item> maximum </item>
    <item> maybe </item>
    <item> min </item>
    <item> minBound </item>
    <item> minimum </item>
    <item> mod </item>
    <item> negate </item>
    <item> not </item>
    <item> notElem </item>
    <item> null </item>
    <item> numerator </item>
    <item> odd </item>
    <item> or </item>
    <item> ord </item>
    <item> otherwise </item>
    <item> pack </item>
    <item> pi </item>
    <item> pred </item>
    <item> primExitWith </item>
    <item> print </item>
    <item> product </item>
    <item> properFraction </item>
    <item> putChar </item>
    <item> putStr </item>
    <item> putStrLn </item>
    <item> quot </item>
    <item> quotRem </item>
    <item> range </item>
    <item> rangeSize </item>
    <item> read </item>
    <item> readDec </item>
    <item> readFile </item>
    <item> readFloat </item>
    <item> readHex </item>
    <item> readIO </item>
    <item> readInt </item>
    <item> readList </item>
    <item> readLitChar </item>
    <item> readLn </item>
    <item> readOct </item>
    <item> readParen </item>
    <item> readSigned </item>
    <item> reads </item>
    <item> readsPrec </item>
    <item> realToFrac </item>
    <item> recip </item>
    <item> rem </item>
    <item> repeat </item>
    <item> replicate </item>
    <item> return </item>
    <item> reverse </item>
    <item> round </item>
    <item> scaleFloat </item>
    <item> scanl </item>
    <item> scanl1 </item>
    <item> scanr </item>
    <item> scanr1 </item>
    <item> seq </item>
    <item> sequence </item>
    <item> sequence_ </item>
    <item> show </item>
    <item> showChar </item>
    <item> showInt </item>
    <item> showList </item>
    <item> showLitChar </item>
    <item> showParen </item>
    <item> showSigned </item>
    <item> showString </item>
    <item> shows </item>
    <item> showsPrec </item>
    <item> significand </item>
    <item> signum </item>
    <item> sin </item>
    <item> sinh </item>
    <item> snd </item>
    <item> sort </item>
    <item> span </item>
    <item> splitAt </item>
    <item> sqrt </item>
    <item> subtract </item>
    <item> succ </item>
    <item> sum </item>
    <item> tail </item>
    <item> take </item>
    <item> takeWhile </item>
    <item> tan </item>
    <item> tanh </item>
    <item> threadToIOResult </item>
    <item> toEnum </item>
    <item> toInt </item>
    <item> toInteger </item>
    <item> toLower </item>
    <item> toRational </item>
    <item> toUpper </item>
    <item> truncate </item>
    <item> uncurry </item>
    <item> undefined </item>
    <item> unlines </item>
    <item> until </item>
    <item> unwords </item>
    <item> unzip </item>
    <item> unzip3 </item>
    <item> userError </item>
    <item> words </item>
    <item> writeFile </item>
    <item> zip </item>
    <item> zip3 </item>
    <item> zipWith </item>
    <item> zipWith3 </item>
  </list>
  <list name="prelude class">
    <item> Bounded </item>
    <item> Enum </item>
    <item> Eq </item>
    <item> Floating </item>
    <item> Fractional </item>
    <item> Functor </item>
    <item> Integral </item>
    <item> Ix </item>
    <item> Monad </item>
    <item> Num </item>
    <item> Ord </item>
    <item> Read </item>
    <item> Real </item>
    <item> RealFloat </item>
    <item> RealFrac </item>
    <item> Show </item>
  </list>
  <list name="prelude type">
    <item> Bool </item>
    <item> Char </item>
    <item> Double </item>
    <item> Either </item>
    <item> FilePath </item>
    <item> Float </item>
    <item> Int </item>
    <item> Integer </item>
    <item> IO </item>
    <item> IOError </item>
    <item> Maybe </item>
    <item> Ordering </item>
    <item> Ratio </item>
    <item> Rational </item>
    <item> ReadS </item>
    <item> ShowS </item>
    <item> String </item>
    <item> ByteString </item>
  </list>
  <list name="prelude data">
    <item> False </item>
    <item> True </item>
    <item> Left </item>
    <item> Right </item>
    <item> Just </item>
    <item> Nothing </item>
    <item> EQ </item>
    <item> LT </item>
    <item> GT </item>
  </list>
  <list name="class">
    <item> Applicative </item>
    <item> Foldable </item>
    <item> Traversable </item>
  </list>
  <list name="c2hs_keywords">
    <item> qualified </item>
    <item> lib </item>
    <item> prefix </item>
    <item> as </item>
    <item> with </item>
    <item> call </item>
    <item> pure </item>
    <item> unsafe </item>
    <item> get </item>
    <item> set </item>
    <item> foreign </item>
    <item> stable </item>
    <item> nocode </item>
  </list>
  <list name="import_keywords">
    <item> as </item>
    <item> qualified </item>
    <item> hiding </item>
  </list>
  <contexts>
    <context attribute="Normal" lineEndContext="#stay" name="code">
      <RegExpr attribute="Pragma"  context="#stay" String="\{-#.*#-\}"/>
      <RegExpr attribute="Comment" context="comments" String="\{-[^#]?" />
      <RegExpr attribute="Comment" context="comment"  String="--[^\-!#\$%&amp;\*\+/&lt;=&gt;\?&#92;@\^\|~\.:].*$" />
      <RegExpr attribute="Keyword" context="import"   String="import\s+" />
      <RegExpr attribute="C2HS Directive"  context="c2hs directive" String="\{#"/>
      <RegExpr attribute="C2HS Directive"  context="c2hs include" String="#"/>

      <keyword attribute="Keyword"          context="#stay" String="keywords" />
      <keyword attribute="Function Prelude" context="#stay" String="prelude function" />
      <keyword attribute="Type Prelude"     context="#stay" String="prelude type" />
      <keyword attribute="Data Prelude"     context="#stay" String="prelude data" />
      <keyword attribute="Class Prelude"    context="#stay" String="prelude class" />
      <keyword attribute="Class Prelude"    context="#stay" String="class" />

      <RegExpr attribute="Special"          context="#stay" String="(::|=&gt;|\-&gt;|&lt;\-)" />
      <AnyChar attribute="Special"          context="#stay" String="∷⇒→←∀∃" />
      <RegExpr attribute="Signature"        context="#stay" String="\s*[a-z][a-zA-Z0-9_']*\s*(?=::[^\-!#\$%&amp;\*\+/&lt;=&gt;\?&#92;@\^\|~\.:])" />
      <RegExpr attribute="Signature"        context="#stay" String="\s*(\([\-!#\$%&amp;\*\+/&lt;=&gt;\?&#92;@\^\|~\.:]*\))*\s*(?=::[^\-!#\$%&amp;\*\+/&lt;=&gt;\?&#92;@\^\|~\.:])" />
      <RegExpr attribute="Function"         context="#stay" String="([A-Z][a-zA-Z0-9_']*\.)*[a-z][a-zA-Z0-9_']*" />
      <RegExpr attribute="Operator"         context="#stay" String="([A-Z][a-zA-Z0-0_']*\.)*[\-!#\$%&amp;\*\+/&lt;=&gt;\?&#92;@\^\|~\.:]+" />
      <RegExpr attribute="Type"             context="#stay" String="([A-Z][a-zA-Z0-9_']*\.)*[A-Z][a-zA-Z0-9_']*" />

      <RegExpr    attribute="Float"   context="#stay" String ="\d+\.\d+([Ee][+-]?\d+)?|\d+[Ee][+-]?\d+"/>
      <RegExpr    attribute="Octal"   context="#stay" String="0[Oo][0-7]+"/>
      <RegExpr    attribute="Hex"     context="#stay" String="0[Xx][0-9A-Fa-f]+"/>
      <Int        attribute="Decimal" context="#stay" />
      <DetectChar attribute="Char"    context="char" char="'" />
      <DetectChar attribute="String"  context="string" char="&quot;" />

      <DetectChar attribute="Function Infix" context="infix" char="`"/>
      <Detect2Chars attribute="EnumFromTo" context="#stay" char ="." char1="." />
      <AnyChar      attribute="EnumFromTo" context="#stay" String="‥" />
    </context>
    <context attribute="Comment" lineEndContext="#pop" name="comment" />
    <context attribute="Comment" lineEndContext="#stay" name="comments">
      <Detect2Chars attribute="Comment" context="#pop" char="-" char1="}" />
    </context>
    <context attribute="Char" lineEndContext="#pop" name="char">
      <RegExpr attribute="Char" context="#stay" String="\\." />
      <DetectChar attribute="Char" context="#pop" char="'" />
    </context>
    <context attribute="String" lineEndContext="#stay" name="string">
      <RegExpr attribute="String" context="#stay" String="\\." />
      <DetectChar attribute="String" context="#pop" char="&quot;" />
    </context>
    <context attribute="Function Infix" lineEndContext="#stay" name="infix">
      <DetectChar attribute="Function Infix" context="#pop" char="`"/>
    </context>
    <context attribute="Import Statement" lineEndContext="#pop" name="import">
      <keyword attribute="Keyword"          context="#stay" String="import_keywords" />
      <RegExpr attribute="Function"         context="#stay" String="([A-Z][a-zA-Z0-9_']*\.)*[a-z][a-zA-Z0-9_']*" />
      <RegExpr attribute="Type"             context="#stay" String="([A-Z][a-zA-Z0-9_']*\.)*[A-Z][a-zA-Z0-9_']*" />

      <RegExpr attribute="Pragma"  context="#stay" String="\{-#.*#-\}"/>
      <RegExpr attribute="Comment" context="comments" String="\{-[^#]?" />
      <RegExpr attribute="Comment" context="comment"  String="--[^\-!#\$%&amp;\*\+/&lt;=&gt;\?&#92;@\^\|~\.:].*$" />
    </context>
    
    <context attribute="C2HS Directive" lineEndContext="#stay" name="c2hs directive">
      <Detect2Chars attribute="C2HS Directive" context="#pop" char="#" char1="}" />
      <keyword attribute="Keyword" context="#stay"          String="c2hs_keywords" />
      <RegExpr attribute="Keyword" context="#stay"          String="context" />
      <RegExpr attribute="Keyword" context="#stay"          String="call" />
      <RegExpr attribute="Keyword" context="#stay"          String="sizeof" />
      <RegExpr attribute="Keyword" context="#stay"          String="alignof" />
      <RegExpr attribute="Keyword" context="c2hs fun"       String="fun" />
      <RegExpr attribute="Keyword" context="c2hs pointer"   String="pointer" />
      <RegExpr attribute="Keyword" context="c2hs enum"      String="enum" />
      <RegExpr attribute="Keyword" context="c2hs import"    String="import" />
    </context>
    <context attribute="C2HS Directive" lineEndContext="#stay" name="c2hs import">
      <RegExpr attribute="Type"    context="#stay" String="([A-Z][a-zA-Z0-9_']*\.)*[A-Z][a-zA-Z0-9_']*" />
      <Detect2Chars attribute="C2HS Directive" context="#pop#pop" char="#" char1="}" />
    </context>
    <context attribute="C2HS Directive" lineEndContext="#pop" name="c2hs include">
      <RegExpr attribute="Keyword" context="#stay" String="include" />
      <RegExpr                     context="#stay" String="*.>$" />
    </context>
    <context attribute="C2HS Directive" lineEndContext="#stay" name="c2hs pointer">
      <keyword attribute="Keyword" context="#stay" String="c2hs_keywords" />
      <RegExpr attribute="Keyword" context="#stay" String="newtype" />
      <RegExpr attribute="Type"    context="#stay" String="([A-Z][a-zA-Z0-9_']*\.)*[A-Z][a-zA-Z0-9_']*" />
      <Detect2Chars attribute="C2HS Directive" context="#pop#pop" char="#" char1="}" />
    </context>
    <context attribute="C2HS Directive" lineEndContext="#stay" name="c2hs fun">
      <keyword attribute="Keyword" context="#stay" String="c2hs_keywords" />
      <RegExpr attribute="Type" context="#stay" String="`[^']*'" />
      <Detect2Chars attribute="C2HS Directive" context="#pop#pop" char="#" char1="}" />
    </context>
    <context attribute="C2HS Directive" lineEndContext="#stay" name="c2hs enum">
      <RegExpr attribute="Type"             context="#stay" String="([A-Z][a-zA-Z0-9_']*\.)*[A-Z][a-zA-Z0-9_']*" />
      <Detect2Chars attribute="C2HS Directive" context="#pop#pop" char="#" char1="}" />
    </context>
  </contexts>
  <itemDatas>
    <itemData name="Normal"           defStyleNum="dsNormal"   spellChecking="false" />
    <itemData name="Comment"          defStyleNum="dsComment" />
    <itemData name="Pragma"           defStyleNum="dsOthers"   spellChecking="false" />

    <itemData name="Keyword"          defStyleNum="dsKeyword"  spellChecking="false" />
    <itemData name="Type Prelude"     defStyleNum="dsDataType" spellChecking="false" />
    <itemData name="Function Prelude" defStyleNum="dsFunction" spellChecking="false" />
    <itemData name="Data Prelude"     defStyleNum="dsKeyword"  spellChecking="false" />
    <itemData name="Class Prelude"    defStyleNum="dsKeyword"  spellChecking="false" />

    <itemData name="Signature"        defStyleNum="dsOthers"  spellChecking="false" />
    <itemData name="Function"         defStyleNum="dsNormal"   spellChecking="false" />
    <itemData name="Operator"         defStyleNum="dsFunction" spellChecking="false" />
    <itemData name="Type"             defStyleNum="dsDataType" spellChecking="false" />
    <itemData name="Special"          defStyleNum="dsOthers"  spellChecking="false" />

    <itemData name="Octal"            defStyleNum="dsBaseN"    spellChecking="false" />
    <itemData name="Hex"              defStyleNum="dsBaseN"    spellChecking="false" />
    <itemData name="Decimal"          defStyleNum="dsDecVal"   spellChecking="false" />
    <itemData name="Float"            defStyleNum="dsFloat"    spellChecking="false" />
    <itemData name="Char"             defStyleNum="dsChar"     spellChecking="false" />
    <itemData name="String"           defStyleNum="dsString" />

    <itemData name="Function Infix"   defStyleNum="dsOthers"   spellChecking="false" />
    <itemData name="EnumFromTo"       defStyleNum="dsOthers"   spellChecking="false" />
    
    <itemData name="C2HS Directive"   defStyleNum="dsString"   spellChecking="false" />
  </itemDatas>
  </highlighting>
  <general>
    <folding indentationsensitive="1"/>
    <comments>
      <comment name="singleLine" start="--" />
      <comment name="multiLine" start="{-" end="-}" />
    </comments>
    <keywords casesensitive="1" />
</general>
</language>
