
SyntaxHighlighter.brushes.Haskell = function()
{

                var _split = function(str)
                     {
                       return "\\s"+str.replace(/ /g,"\\s|\\s").replace(/>/g, '&gt;').replace(/</g, '&lt;')+"\\s";
                     }

        var keywords = 'case class data deriving do else if import in infixl infixr instance let module of' + 
                       'newtype primitive then type where as hiding qualified default';

        var syntax_operators = '=> -> <- ::'; 

        var common_operators = "\\$ \\. >>= >>";


        this.regexList = [
                { regex: /--.*$/gm, css: 'comments' },                      			// one line comments
                { regex: /{-[\s\S]*?-}/gm, css: 'comments' },                      	        // multiline comments
                { regex: SyntaxHighlighter.regexLib.doubleQuotedString,  css: 'string' },   		// double quoted strings
                { regex: SyntaxHighlighter.regexLib.singleQuotedString,  css: 'string' },   		// single quoted strings
                { regex: new RegExp('^ *#.*', 'gm'), css: 'preprocessor' },			// preprocessor
                { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' },     	// keyword
                { regex: new RegExp(_split(syntax_operators), 'gm'), css: 'variable' },  // syntax operators
                { regex: new RegExp(_split(common_operators), 'gm'), css: 'function' },  // common operators
                { regex: /`\w+`/g, css: 'color1' },  					// common operators
                { regex: /\b[A-Z]\w*\b/g, css: 'color3' },  				// type constructors
        ];

};

SyntaxHighlighter.brushes.Haskell.prototype	= new SyntaxHighlighter.Highlighter();
SyntaxHighlighter.brushes.Haskell.aliases		= ['haskell'];

