
Cc[Tc        	   @   s  d  Z  d d l Z d d l m Z m Z m Z m Z m Z m Z d d l	 m
 Z
 m Z m Z m Z m Z m Z m Z m Z m Z d d l m Z d d d d	 d
 d d d d g	 Z e j d  Z d e f d     YZ d e f d     YZ d e f d     YZ d	 e f d     YZ d e f d     YZ d
 e f d     YZ d e f d     YZ d e f d     YZ  d e f d     YZ! d e f d     YZ" d S(   s   
    pygments.lexers.haskell
    ~~~~~~~~~~~~~~~~~~~~~~~

    Lexers for Haskell and related languages.

    :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
iN(   t   Lexert
   RegexLexert   bygroupst   do_insertionst   defaultt   include(	   t   Textt   Commentt   Operatort   Keywordt   Namet   Stringt   Numbert   Punctuationt   Generic(   t	   unistringt   HaskellLexert
   IdrisLexert	   AgdaLexert   CryptolLexert   LiterateHaskellLexert   LiterateIdrisLexert   LiterateAgdaLexert   LiterateCryptolLexert	   KokaLexers   .*?
c           B   sq  e  Z d  Z d Z d d g Z d g Z d g Z e j e j	 BZ
 dt Z du Z i d2 e f d3 e j f d4 e j d5 f d6 e j d7 f d8 e j d9 f d: e j f d; d< j e  e j f d= e j f d> e j d? e j f d@ e j dA e f dB e j d? e j f dC e j f dD e j f dE e j f dF e f dG e j  f dH e j  f dI e j! f dJ e j" f dK e j# f dL e j dM f dN e dO f dP e j f dQ e j$ f dR e% f g dS 6d2 e f dN e dO f dT e% dU f dV e f dW e j dX e j dY e& e j' e e e e  dU f dW e j dZ e& e j' e e e e%  d[ f dW e j d\ e& e j' e e%  d[ f d] e j' dU f g d7 6d2 e f dW e j d\ e& e j' e e%  d[ f d^ e j d_ e j' dU f g d9 6d2 e f d^ e j d` e j f da e j db e j f d3 e j f d4 e j d5 f dc e% f dF e f dd e% dv f dT e% de f g	 d[ 6df e j f d4 e j dg f dh e j dU f di e j f g d5 6dj e j dU f dk e j( dl f dL e j dU f g dM 6dm e f dk e j( dl f dN e dU f g dO 6dn e j( dU f do e j dp e j( dU f d< j e  e j( dU f dq e j( dU f dr e j( dU f dK e j( dU f ds e j( dU f g dl 6Z) RS(w   sk   
    A Haskell lexer based on the lexemes defined in the Haskell 98 Report.

    .. versionadded:: 0.8
    t   Haskellt   haskellt   hss   *.hss   text/x-haskellt   caset   classt   dataR   t   derivingt   dot   elset   ift   ins
   infix[lr]?t   instancet   lett   newtypet   oft   thent   typet   wheret   _t   NULt   SOHs   [SE]TXt   EOTt   ENQt   ACKt   BELt   BSt   HTt   LFt   VTt   FFt   CRs   S[OI]t   DLEs   DC[1-4]t   NAKt   SYNt   ETBt   CANt   EMt   SUBt   ESCs   [FGRU]St   SPt   DELs   \s+s!   --(?![!#$%&*+./<=>?@^|_~:\\]).*?$s   \{-t   comments
   \bimport\bt   imports
   \bmodule\bt   modules	   \berror\bs   \b(%s)(?!\')\bt   |s   '[^\\]'s   ^[_s   ][\w\']*s   '?[_s   ][\w']*s   ('')?[s   \\(?![:!#$%&*+.\\/<=>?@^|~-]+)s+   (<-|::|->|=>|=)(?![:!#$%&*+.\\/<=>?@^|~-]+)s   :[:!#$%&*+.\\/<=>?@^|~-]*s   [:!#$%&*+.\\/<=>?@^|~-]+s   \d+[eE][+-]?\d+s   \d+\.\d+([eE][+-]?\d+)?s   0[oO][0-7]+s   0[xX][\da-fA-F]+s   \d+t   't	   charactert   "t   strings   \[\]s   \(\)s   [][(),;`{}]t   roots   \)s   #pops   qualified\bs   ([s   ][\w.]*)(\s+)(as)(\s+)([s   ][\w.]*)s   ][\w.]*)(\s+)(hiding)(\s+)(\()t   funclists   ][\w.]*)(\s+)(\()s   [\w.]+t   [s   ][\w.]*s   ]\w*s   (_[\w\']+|[s	   ][\w\']*)t   ,s   \(s   #pop:2s   [^-{}]+s   #pushs   -\}s   [-{}]s   [^\\']'s   \\t   escapes   [^\\"]+s   [abfnrtv"\'&\\]s   \^[][s   @^_]s   o[0-7]+s   x[\da-fA-F]+s   \s+\\(   R   R   s   datas   defaultR   R    s   elseR"   s   ins
   infix[lr]?s   instanceR%   R&   R'   R(   s   typeR*   R+   (   R,   R-   s   [SE]TXR.   R/   R0   R1   R2   R3   R4   R5   R6   R7   s   S[OI]R8   s   DC[1-4]R9   R:   R;   R<   R=   R>   R?   s   [FGRU]SR@   RA   (   RK   RK   (*   t   __name__t
   __module__t   __doc__t   namet   aliasest	   filenamest	   mimetypest   ret	   MULTILINEt   UNICODEt   flagst   reservedt   asciiR   R   t   Singlet	   MultilineR	   t   ReservedR
   t	   Exceptiont   joinR   t   Chart   unit   Llt   Functiont   Lut   TypeR   t   WordR   t   Floatt   Octt   Hext   Integert   BuiltinR   R   t	   Namespacet   Escapet   tokens(    (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/haskell.pyR      s   		     					!				c        .   B   sJ  e  Z d  Z d Z d d g Z d g Z d g Z d Z d Z d Z	 i dZ d[ j
 e	  e e e j  f d\ e e e j  f d] e e e j  f d^ e e e j  d_ f d` e e e j e e j e  f da d[ j
 e  e j f db e e j e  dc f dd e j f de e f df e j f dg e j f dh e j f di e j f dj e j f dk e j f dl e j dm f dn e do f dp e f dq e f g dr 6ds e f dt e e j e e  du f dv e j dw f g dc 6ds e f dx e j f dy e j f dz e j f d{ e j d_ f d| e f d} e f d~ e d f d e d f g	 du 6d e j f d{ e j d f d e j dw f d e j f g d_ 6d e j f d e j d f dl e j dw f g dm 6d e f d e j d f dn e dw f g do 6d e j dw f d e j dw f d[ j
 e  e j dw f d e j dw f d e j dw f dk e j dw f d e j dw f g d 6Z  RS(   s   
    A lexer for the dependently typed programming language Idris.

    Based on the Haskell and Agda Lexer.

    .. versionadded:: 2.0
    t   Idrist   idrist   idrs   *.idrs   text/x-idrisR   R   R   R   t   usingR    R!   R"   R#   s
   infix[lr]?R$   t   rewritet   autot	   namespacet   codatat   mutualt   privatet   publict   abstractt   totalt   partialR%   t   proofR'   R(   t   staticR*   R+   t   witht   patternt   termt   syntaxt   prefixt	   postulatet
   parameterst   recordt   dslt
   impossiblet   implicitt   tacticst   introst   introt   computet   refinet   exactt   trivialR,   R-   s   [SE]TXR.   R/   R0   R1   R2   R3   R4   R5   R6   R7   s   S[OI]R8   s   DC[1-4]R9   R:   R;   R<   R=   R>   R?   s   [FGRU]SR@   RA   t   libt   linkt   flagR   t   hidet   freezet   accesst   loggingt   dynamicRR   t   error_handlerst   languages   ^(\s*)(%%%s)RE   s(   (\s*)(--(?![!#$%&*+./<=>?@^|_~:\\]).*?)$s   (\s*)(\|{3}.*?)$s
   (\s*)(\{-)RB   s   ^(\s*)([^\s(){}]+)(\s*)(:)(\s*)s   \b(%s)(?!\')\bs   (import|module)(\s+)RD   s   ('')?[A-Z][\w\']*s   [a-z][\w\']*s   (<-|::|->|=>|=)s"   ([(){}\[\]:!#$%&*+.\\/<=>?@^|~-]+)s   \d+[eE][+-]?\d+s   \d+\.\d+([eE][+-]?\d+)?s   0[xX][\da-fA-F]+s   \d+RF   RG   RH   RI   s
   [^\s(){}]+s   \s+?RJ   s   \s+s   ([A-Z][\w.]*)(\s+)(\()RK   s   [A-Z][\w.]*s   #pops   [A-Z]\w*s   (_[\w\']+|[a-z][\w\']*)s   --.*$s   \{-RM   s   [:!#$%&*+.\\/<=>?@^|~-]+s   \(s   \)s   #pop:2s   [^-{}]+s   #pushs   -\}s   [-{}]s   [^\\']s   \\RN   s   [^\\"]+s   [abfnrtv"\'&\\]s   \^[][A-Z@^_]s   o[0-7]+s   x[\da-fA-F]+s   \s+\\(.   s   cases   classs   datas   defaultRs   s   dos   elses   ifs   ins
   infix[lr]?s   instanceRt   Ru   s	   namespaceRw   Rx   Ry   Rz   R{   R|   R}   s   letR~   s   ofs   thenR   s   whereR+   R   s   patternR   R   s   prefixR   R   s   recordR   R   R   R   R   R   R   R   R   R   (   s   NULs   SOHs   [SE]TXs   EOTs   ENQs   ACKs   BELs   BSs   HTs   LFs   VTs   FFs   CRs   S[OI]s   DLEs   DC[1-4]s   NAKs   SYNs   ETBs   CANs   EMs   SUBs   ESCs   [FGRU]Ss   SPs   DEL(   s   libs   linkR   s   includeR   R   s   accesss   defaultR   R   s   nameR   R   (   s   funclists   funclist(!   RO   RP   RQ   RR   RS   RT   RU   RZ   R[   t
   directivesR`   R   R   R	   R^   R   R\   R]   R
   Rd   R   Rg   Rf   R   Rh   Rj   Rk   R   Ra   Rm   R   Rn   Ro   (    (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/haskell.pyR      s   		           							c        "   B   sB  e  Z d  Z d Z d g Z d g Z d g Z d d d d d	 d
 d d d d d d d d d d d d d d d d d d d d d d  d! d" d# d$ d% d& g" Z i d' e e	 e
 j e	 e j e	  f d( e j f d) e j d* f d+ e j d, f d- d. j e  e j f d/ e e j e	  d0 f d1 e j f d2 e f d3 e j f d4 e j f d5 e j f d6 e j f d7 e j f d8 e j d9 f d: e d; f d< e	 f d= e	 f g d> 6d? e j f d+ e j d@ f dA e j dB f dC e j f g d, 6d) e j d* f dD e
 dB f dE e	 f g d0 6e j d* d* 6e j d9 d9 6e j d; d; 6e j dF dF 6Z RS(G   s   
    For the `Agda <http://wiki.portal.chalmers.se/agda/pmwiki.php>`_
    dependently typed functional programming language and proof assistant.

    .. versionadded:: 2.0
    t   Agdat   agdas   *.agdas   text/x-agdaR{   Rw   t   coinductivet   constructorR   t   fieldt   forallt   hidingR#   t	   inductivet   infixt   infixlt   infixrR$   R%   Rx   t   openR   R   t	   primitiveRy   t   quotet	   quoteGoalt	   quoteTermR   t   renamingRt   R   t   tactict   unquotet   unquoteDeclRs   R*   R   s   ^(\s*)([^\s(){}]+)(\s*)(:)(\s*)s!   --(?![!#$%&*+./<=>?@^|_~:\\]).*?$s   \{-RB   s   \{!t   holes   \b(%s)(?!\')\bRE   s   (import|module)(\s+)RD   s   \b(Set|Prop)\bs   (\(|\)|\{|\})u   (\.{1,3}|\||Λ|∀|→|:|=|->)s   \d+[eE][+-]?\d+s   \d+\.\d+([eE][+-]?\d+)?s   0[xX][\da-fA-F]+s   \d+RF   RG   RH   RI   s
   [^\s(){}]+s   \s+?RJ   s   [^!{}]+s   #pushs   !\}s   #pops   [!{}]s   [a-zA-Z][\w.]*s
   [^a-zA-Z]+RN   (   RO   RP   RQ   RR   RS   RT   RU   RZ   R   R   R
   Rd   R   Rg   R   R\   R]   t	   DirectiveR`   R	   R^   Rf   R   Rh   Rj   Rk   R   Ra   R   Ro   (    (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/haskell.pyR     sT   						c           B   s  e  Z d  Z d Z d d g Z d g Z d g Z d Z d Z i d8 e	 f d9 e
 j f d: e
 j d; f d< e j d f d= e j d f d> e j f d? d@ j e  e j f dA e j f dB e f dC e j f dD e j f dE e j f dF e j f dG e f dH e j f dI e j f dJ e j f dK e j f dL e j f dM e j dN f dO e dP f dQ e j f dR e j f dS e f g dT 6d8 e	 f dO e dP f dU e dV f dW e f dX e e j  e	 e e	 e  dV f dY e e j  e	 e e	 e  dZ f d[ e e j  e	 e  dZ f d\ e j  dV f g d 6d8 e	 f d[ e e j  e	 e  dZ f d] e j  dV f g d 6d8 e	 f d^ e j f d_ e j f d` e f dG e f da e d f dU e db f g dZ 6dc e
 j f d: e
 j dd f de e
 j dV f df e
 j f g d; 6dg e j dV f dh e j! di f dM e j dV f g dN 6dj e f dh e j! di f dO e dV f g dP 6dk e j! dV f dl e j! dV f d@ j e  e j! dV f dm e j! dV f dn e j! dV f dL e j! dV f do e j! dV f g di 6Z" e# d  Z$ d   Z% RS(   ss   
    FIXME: A Cryptol2 lexer based on the lexemes defined in the Haskell 98 Report.

    .. versionadded:: 2.0
    t   Cryptolt   cryptolt   crys   *.crys   text/x-cryptolt   Aritht   Bitt   Cmpt   Falset   Inft   TrueR!   t   exportt   externt   finR"   RC   t   inft   lg2t   maxt   minRD   R&   t   pragmat   propertyR(   R)   R*   t   widthR,   R-   s   [SE]TXR.   R/   R0   R1   R2   R3   R4   R5   R6   R7   s   S[OI]R8   s   DC[1-4]R9   R:   R;   R<   R=   R>   R?   s   [FGRU]SR@   RA   s   \s+s   //.*$s   /\*RB   s
   \bimport\bs
   \bmodule\bs	   \berror\bs   \b(%s)(?!\')\bRE   s   ^[_a-z][\w\']*s   '?[_a-z][\w']*s   ('')?[A-Z][\w\']*s   \\(?![:!#$%&*+.\\/<=>?@^|~-]+)s+   (<-|::|->|=>|=)(?![:!#$%&*+.\\/<=>?@^|~-]+)s   :[:!#$%&*+.\\/<=>?@^|~-]*s   [:!#$%&*+.\\/<=>?@^|~-]+s   \d+[eE][+-]?\d+s   \d+\.\d+([eE][+-]?\d+)?s   0[oO][0-7]+s   0[xX][\da-fA-F]+s   \d+RF   RG   RH   RI   s   \[\]s   \(\)s   [][(),;`{}]RJ   s   \)s   #pops   qualified\bs(   ([A-Z][\w.]*)(\s+)(as)(\s+)([A-Z][\w.]*)s#   ([A-Z][\w.]*)(\s+)(hiding)(\s+)(\()RK   s   ([A-Z][\w.]*)(\s+)(\()s   [\w.]+s   [A-Z][\w.]*s   [A-Z]\w*s   (_[\w\']+|[a-z][\w\']*)RM   s   \(s   #pop:2s   [^/*]+s   #pushs   \*/s   [*/]s   [^\\']'s   \\RN   s   [^\\"]+s   [abfnrtv"\'&\\]s   \^[][A-Z@^_]s   o[0-7]+s   x[\da-fA-F]+s   \s+\\R`   t   splitt   reverset	   transposet   lengtht   tails   <<s   >>s   <<<s   >>>t   constt   regt   part   seqt   ASSERTt	   undefinedt   errort   tracec         c   ss   d g } xc t  j |  | |  D]L \ } } } | t k r] | |  j k r] | t j | f Vq | | | f Vq Wd  S(   NRJ   (   R   t   get_tokens_unprocessedR
   t   EXTRA_KEYWORDSRl   (   t   selft   textt   stackt   indext   tokent   value(    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/haskell.pyR     s    	"(   R   R   R   s   FalseR   s   Trues   elseR   R   R   s   ifs   importR   R   s   maxs   mins   modules   newtypeR   s   propertys   thens   types   wheres   width(   s   NULs   SOHs   [SE]TXs   EOTs   ENQs   ACKs   BELs   BSs   HTs   LFs   VTs   FFs   CRs   S[OI]s   DLEs   DC[1-4]s   NAKs   SYNs   ETBs   CANs   EMs   SUBs   ESCs   [FGRU]Ss   SPs   DEL(   s   funclists   funclist(   s   joins   splits   reverseR   s   widthR   s   tails   <<s   >>s   <<<s   >>>R   R   R   R   s   ASSERTR   s   errorR   (&   RO   RP   RQ   RR   RS   RT   RU   RZ   R[   R   R   R\   R]   R	   R^   R
   R_   R`   Rd   Rf   R   Rg   R   Rh   Ri   Rj   Rk   R   Ra   Rl   R   R   Rm   Rn   Ro   t   setR   R   (    (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/haskell.pyR   M  s   		      										  	t   LiterateLexerc           B   s/   e  Z d  Z e j d  Z d   Z d   Z RS(   s  
    Base class for lexers of literate file formats based on LaTeX or Bird-style
    (prefixing each code line with ">").

    Additional options accepted:

    `litstyle`
        If given, must be ``"bird"`` or ``"latex"``.  If not given, the style
        is autodetected: if the first non-whitespace character in the source
        is a backslash or percent character, LaTeX is assumed, else Bird.
    s   (>[ \t]*)(.*\n)c         K   s   | |  _  t j |  |  d  S(   N(   t	   baselexerR    t   __init__(   R   R   t   options(    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/haskell.pyR     s    	c         c   sN  |  j  j d  } | d  k rF | j   d d !d k r= d p@ d } n  d } g  } | d k rxt j |  D] } | j   } |  j j |  } | r | j	 t
 |  d t j | j d  f g f  | | j d  7} qn | j	 t
 |  d t | f g f  qn Wnd	 d
 l m } | |  j    }	 d }
 d } x t j |  D] } | j   } |
 r| j   j d  rd }
 | | 7} q| | 7} qF| j   j d  rd }
 | | 7} | j	 t
 |  t |	 j |   f  d } qF| | 7} qFW| j	 t
 |  t |	 j |   f  x( t | |  j j |   D] } | Vq;Wd  S(   Nt   litstylei    i   s   %\t   latext   birdt    i   i(   t   TexLexers
   \end{code}s   \begin{code}(   R   t   gett   Nonet   lstript   line_ret   finditert   groupt   bird_ret   matcht   appendt   lenR   t   SpecialR   t   pygments.lexers.markupR   t
   startswitht   listR   R   R   (   R   R   t   stylet   codet
   insertionsR   t   linet   mR   t   lxlexert	   codelinesR   t   item(    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/haskell.pyR     sH    (",
	"(   RO   RP   RQ   RV   t   compileR   R   R   (    (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/haskell.pyR     s   	c           B   s>   e  Z d  Z d Z d d d g Z d g Z d g Z d   Z RS(   sn  
    For Literate Haskell (Bird-style or LaTeX) source.

    Additional options accepted:

    `litstyle`
        If given, must be ``"bird"`` or ``"latex"``.  If not given, the style
        is autodetected: if the first non-whitespace character in the source
        is a backslash or percent character, LaTeX is assumed, else Bird.

    .. versionadded:: 0.9
    s   Literate Haskellt   lhss   literate-haskellt   lhaskells   *.lhss   text/x-literate-haskellc         K   s#   t  |   } t j |  | |  d  S(   N(   R   R   R   (   R   R   t   hslexer(    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/haskell.pyR   )  s    (   RO   RP   RQ   RR   RS   RT   RU   R   (    (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/haskell.pyR     s   		c           B   s>   e  Z d  Z d Z d d d g Z d g Z d g Z d   Z RS(   sl  
    For Literate Idris (Bird-style or LaTeX) source.

    Additional options accepted:

    `litstyle`
        If given, must be ``"bird"`` or ``"latex"``.  If not given, the style
        is autodetected: if the first non-whitespace character in the source
        is a backslash or percent character, LaTeX is assumed, else Bird.

    .. versionadded:: 2.0
    s   Literate Idrist   lidrs   literate-idrist   lidriss   *.lidrs   text/x-literate-idrisc         K   s#   t  |   } t j |  | |  d  S(   N(   R   R   R   (   R   R   R   (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/haskell.pyR   @  s    (   RO   RP   RQ   RR   RS   RT   RU   R   (    (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/haskell.pyR   .  s   		c           B   s;   e  Z d  Z d Z d d g Z d g Z d g Z d   Z RS(   sU  
    For Literate Agda source.

    Additional options accepted:

    `litstyle`
        If given, must be ``"bird"`` or ``"latex"``.  If not given, the style
        is autodetected: if the first non-whitespace character in the source
        is a backslash or percent character, LaTeX is assumed, else Bird.

    .. versionadded:: 2.0
    s   Literate Agdat   lagdas   literate-agdas   *.lagdas   text/x-literate-agdac         K   s)   t  |   } t j |  | d d | d  S(   NR   R   (   R   R   R   (   R   R   t	   agdalexer(    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/haskell.pyR   W  s    (   RO   RP   RQ   RR   RS   RT   RU   R   (    (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/haskell.pyR   E  s   		c           B   s>   e  Z d  Z d Z d d d g Z d g Z d g Z d   Z RS(   sn  
    For Literate Cryptol (Bird-style or LaTeX) source.

    Additional options accepted:

    `litstyle`
        If given, must be ``"bird"`` or ``"latex"``.  If not given, the style
        is autodetected: if the first non-whitespace character in the source
        is a backslash or percent character, LaTeX is assumed, else Bird.

    .. versionadded:: 2.0
    s   Literate Cryptolt   lcrys   literate-cryptolt   lcryptols   *.lcrys   text/x-literate-cryptolc         K   s#   t  |   } t j |  | |  d  S(   N(   R   R   R   (   R   R   t   crylexer(    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/haskell.pyR   n  s    (   RO   RP   RQ   RR   RS   RT   RU   R   (    (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/haskell.pyR   \  s   		c        "   B   s  e  Z d  Z d Z d g Z d d g Z d g Z d d d d	 d
 d d d d d d d d d d d d d d d d d d d d d d d  d! d" d# d$ d% d& g" Z d	 d
 d d d d$ g Z d' d( d) d* g Z	 d+ d, d- d. d/ d0 d1 d2 d3 d4 d5 d6 d7 g Z
 d8 Z d9 e d: Z d; Z e j Z e j Z e j Z i e d<  d= e e d	 f d> e e e e  d? f d@ e e e e  dA f dB dC j e  dD e e e e  d	 f dE e e e e e j  f dF e e e e j e e e e e j  f dG e dH e e e e j  f dI e dH e e e e e j  f dB dC j e	  e e j f dB dC j e  e e f dB dC j e
  e e j f dJ e e f dK e e j e  f dL e e j e  f dM e dH e e j e  f dN e j f dO e  j! dP f e dQ e" f dR e" f dS e# f dT e$ j% f dU e$ j& f dV e$ j' f dW e  j( dX f dY e  j! dZ f g d[ 6d\ e f e d	  g d? 6d] e# d^ f e d	  g dA 6d_ e d` f e da  g d	 6db e d^ f d_ e d` f dc e f dd e e e e  f e da  g d` 6e d<  dB dC j e	  e e f de dC j e  e df e d^ f dg e e f dh e f dN e j f dK e e j e  f di e e j e  f dj e f e) d^  g
 da 6dk e* j+ f dl e f dm e* j, dn f do e* j- f g d< 6dp e* j, f dm e* j, dq f dr e* j, d^ f ds e* j, f g dn 6dt e  j! f du e  j. f dY e  j! d^ f g dP 6dv e  j! f e dw  dx e  j! d^ f g dZ 6dy e  j( f e dw  dz e  j( d^ f g dX 6d{ e  j. f d| e  j. f d} e  j. f d~ e  j. f g dw 6Z/ RS(   sc   
    Lexer for the `Koka <http://koka.codeplex.com>`_
    language.

    .. versionadded:: 1.6
    t   Kokat   kokas   *.kks   *.kkis   text/x-kokaR   R   R   R)   t   cotypet   rectypet   aliast   structt   cont   funt   functiont   valt   vart   externalR"   R(   R!   t   elift   returnR   Ry   Rz   RD   RC   t   asR   t   inlinet   rect   tryt   yieldt   enumt	   interfaceR$   R   t   existst   someR   t   fort   whilet   repeatt   foreachs   foreach-indexedR   t   catcht   finallyt   cst   jst   filet   reft   assigneds   [$%&*+@!/\\^~=.:\-?|<>]+s   (?!t   )s	   (?![\w/])t
   whitespaces   ::?s   (alias)(\s+)([a-z]\w*)?s
   alias-types   (struct)(\s+)([a-z]\w*)?s   struct-types   (%s)RE   s   (\s+)([a-z]\w*)?s4   (module)(\s+)(interface\s+)?((?:[a-z]\w*/)*[a-z]\w*)sb   (import)(\s+)((?:[a-z]\w*/)*[a-z]\w*)(?:(\s*)(=)(\s*)((?:qualified\s*)?)((?:[a-z]\w*/)*[a-z]\w*))?sE   (^(?:(?:public|private)\s*)?(?:function|fun|val))(\s+)([a-z]\w*|\((?:s   |/)\))sE   (^(?:(?:public|private)\s*)?external)(\s+)(inline\s+)?([a-z]\w*|\((?:s   ::?|:=|\->|[=.]s   ((?:[a-z]\w*/)*)([A-Z]\w*)s   ((?:[a-z]\w*/)*)([a-z]\w*)s   ((?:[a-z]\w*/)*)(\((?:s   _\w*s   @"t	   litstrings
   |/(?![*/])t   `s   [{}()\[\];,]s!   [0-9]+\.[0-9]+([eE][\-+]?[0-9]+)?s   0[xX][0-9a-fA-F]+s   [0-9]+RF   t   charRH   RI   RJ   t   =s   (?=\((?!,*\)))s   #pops   [(\[<]s   type-nesteds   type-contents   [)\]>]RM   s   ([a-z]\w*)(\s*)(:)(?!:)s   (?=((%s)s   ))s   [EPHVX]s   [a-z][0-9]*(?![\w/])s   ((?:[a-z]\w*/)*)([a-z]\w+)s   ::|->|[.:|]s	   \n\s*#.*$s   \s+s   /\*RB   s   //.*$s   [^/*]+s   #pushs   \*/s   [*/]s   [^"]+s   ""s	   [^\\"\n]+s   escape-sequences   ["\n]s
   [^\\\'\n]+s   [\'\n]s   \\[nrt\\"\']s   \\x[0-9a-fA-F]{2}s   \\u[0-9a-fA-F]{4}s   \\U[0-9a-fA-F]{6}(0   RO   RP   RQ   RR   RS   RT   RU   t   keywordst   typeStartKeywordst   typekeywordst   builtint   symbolst	   sboundaryt   boundaryR
   t	   Attributet	   tokenTypet   Classt   tokenTypeDefR   t   Empht   tokenConstructorR   R   R	   R   R`   Rm   Rd   Rf   t   Pseudot   VariableR   t   DoubleR   R   R   Rh   Rj   Rk   Ra   R   R   t   PreprocR]   R\   Rn   Ro   (    (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/haskell.pyR   s  s   																							(#   RQ   RV   t   pygments.lexerR    R   R   R   R   R   t   pygments.tokenR   R   R   R	   R
   R   R   R   R   t   pygmentsR   Rb   t   __all__R   R   R   R   R   R   R   R   R   R   R   R   (    (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/haskell.pyt   <module>
   s$   .@	~nEA