! Syntax Highlighting Patterns for Haskell
!
! For NEdit 5.0 and above
!
! Contributed by Koen Claessen (koen@cs.chalmers.se)
! Extended by Cameron Stone (cameron@cse.unsw.edu.au)
! Maintained by Reuben Thomas (rrt@sc3d.org)
!
! In NEdit Version 5.0.1 and beyond, load this pattern by starting nedit with:
!
!     nedit -import <name of this file>
!
! Then, check that the patterns were loaded correctly, and choose Save Defaults
! from the Preferences menu.  The new patterns will now be incorporated into
! your own .nedit file, so the next time you start NEdit, you will no longer
! need to use -import.
!
!- You also need to add
!-    $compword_end = 0
!_ to your .neditmacro file.

nedit.macroCommands: \
        In Comment@Haskell:Shift+Alt+Minus::: {\n\
                beginning-of-selection()\n\
                mark("1")\n\
                deselect-all()\n\
                insert-string("{-")\n\
                newline()\n\
                goto-mark("1")\n\
                beginning-of-selection()\n\
                backward-character("extend")\n\
                backward-character("extend")\n\
                backward-character("extend")\n\
                mark("1")\n\
                end-of-selection()\n\
                deselect-all()\n\
                insert-string("-}")\n\
                newline()\n\
                goto-mark("1")\n\
        }\n\
        Out of Comment@Haskell:Shift+Alt+Equal::: {\n\
                beginning-of-selection()\n\
                mark("1")\n\
                deselect-all()\n\
                replace("{-", "")\n\
                delete-previous-character()\n\
                goto-mark("1")\n\
                end-of-selection()\n\
                deselect-all()\n\
                replace("-}", "", "backward")\n\
                delete-previous-character()\n\
                goto-mark("1")\n\
                process-shift-down()\n\
        }\n
nedit.highlightPatterns: \
        Haskell:1:0{\n\
                comments1:"\\{-":"-\\}"::Comment::\n\
                comments2:"--":"$"::Comment::\n\
                comments3:"#!":"$"::Comment::\n\
                strings:"""":"""":"\\n":String::\n\
                chars:"'.'":::String::\n\
                keywords:"<(type|data|let|in|case|of|module|class|where|instance|import|do|deriving|-\\>|\\<-|=\\>|if|then|else|newtype|hiding|infix|infixl|infixr|primitive)>":::Keyword::\n\
                symbols:"<(\\||\\.|:|=)>":::Keyword::\n\
                braces:"[{}\\[\\]\\(\\)]":::Braces::\n\
                types:"<[A-Z][A-Za-z]*>":::Type::\n\
        }\n\
        Literate Haskell:1:0{\n\
                comments1:"\\{-":"-\\}"::Comment:Code:\n\
                comments2:"--":"$"::Comment:Code:\n\
                comments3:"#!":"$"::Comment:Code:\n\
                strings:"""":"""":"\\n":String:Code:\n\
                chars:"'.'":::String:Code:\n\
                keywords:"<(type|data|let|in|case|of|module|class|where|instance|import|do|deriving|-\\>|\\<-|=\\>|if|then|else|newtype|hiding|infix|infixl|infixr|primitive)>":::Keyword:Code:\n\
                symbols:"<(\\||\\.|:|=)>":::Keyword:Code:\n\
                braces:"[{}\\[\\]]":::Keyword:Code:\n\
                comments11:"\\{-":"-\\}"::Comment:Code1:\n\
                comments21:"--":"$"::Comment:Code1:\n\
                comments31:"#!":"$"::Comment:Code1:\n\
                strings1:"""":"""":"\\n":String:Code1:\n\
                chars1:"'.'":::String:Code1:\n\
                keywords1:"<(type|data|let|in|case|of|module|class|where|instance|import|do|deriving|-\\>|\\<-|=\\>|if|then|else|newtype|hiding|infix|infixl|infixr)>":::Keyword:Code1:\n\
                symbols1:"<(\\||\\.|:|=)>":::Keyword:Code1:\n\
                braces1:"[{}\\[\\]]":::Keyword:Code1:\n\
                Code:"^\\>":"$"::Plain::\n\
                CodeBeginEnd:"^[\\\\]begin\\{code\\}$":"^[\\\\]end\\{code\\}$"::Meta Keyword::\n\
                Code1:"^":"$"::Plain:CodeBeginEnd:\n\
                Text:"^.":"$"::Text Comment::\n\
        }\n
nedit.languageModes: \
        Haskell:.gs .hs:"#!/usr/pd/bin/runhugs.*":Auto::::\n\
        Literate Haskell:.lhs:"#!/usr/pd/bin/runhugs.*":Auto::::\n
nedit.styles: \
        Type:orange4:Bold\n\
        Braces:purple4:Plain\n\
        Meta Keyword:purple4:Plain\n\
