<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">

<language _name="Haskell" version="1.0" _section="Sources" mimetypes="text/x-haskell">
  <line-comment _name = "Line Comment" style= "Comment">
    <start-regex>--</start-regex>
  </line-comment>

  <pattern-item _name="Character" style="String">
    <regex>&apos;.&apos;</regex>
  </pattern-item>

  <string _name="String" style="String" end-at-line-end="TRUE">
    <start-regex>&quot;</start-regex>
    <end-regex>&quot;</end-regex>
  </string>

  <block-comment _name = "Block Comment" style = "Comment">
    <start-regex>\{-</start-regex>
    <end-regex>-\}</end-regex>
  </block-comment>

  <keyword-list _name = "Keywords" style = "Keyword" case-sensitive="TRUE">
    <keyword>as</keyword>
    <keyword>case</keyword>
    <keyword>class</keyword>
    <keyword>data</keyword>
    <keyword>do</keyword>
    <keyword>else</keyword>
    <keyword>hiding</keyword>
    <keyword>if</keyword>
    <keyword>import</keyword>
    <keyword>infix</keyword>
    <keyword>infixl</keyword>
    <keyword>infixr</keyword>
    <keyword>instance</keyword>
    <keyword>let</keyword>
    <keyword>module</keyword>
    <keyword>newtype</keyword>
    <keyword>of</keyword>
    <keyword>pragma</keyword>
    <keyword>qualified</keyword>
    <keyword>then</keyword>
    <keyword>type</keyword>
    <keyword>where</keyword>
  </keyword-list>

  <pattern-item _name= "Data Types" style = "Data Type">
    <regex>\&lt;[A-Z][a-zA-Z0-9_]*</regex>
  </pattern-item>

  <pattern-item _name = "Decimal" style = "Decimal">
    <regex>\b([1-9][0-9]*|0)([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</regex>
  </pattern-item>
  
  <pattern-item _name = "Floating Point Number" style = "Floating Point">
    <regex>\b([0-9]+[Ee][-]?[0-9]+|([0-9]*\.[0-9]+|[0-9]+\.)([Ee][-]?[0-9]+)?)[fFlL]?</regex>
  </pattern-item>
  
  <pattern-item _name = "Octal Number" style = "Base-N Integer">
    <regex>\b0[0-7]+([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</regex>
  </pattern-item>
  
  <pattern-item _name = "Hex Number" style = "Base-N Integer">
    <regex>\b0[xX][0-9a-fA-F]+([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</regex>
  </pattern-item>
</language>
