1/** 2 * Haskell Brushes for SyntaxHighlighter 3.0 3 */ 4(function () { 5 // CommonJS 6 SyntaxHighlighter = SyntaxHighlighter || (typeof require !== 'undefined'? require('shCore').SyntaxHighlighter : null); 7 8 function Brush() { 9 var keywords = 'as case of class data default deriving do forall foreign hiding ' + 10 'if then else import instance let in mdo module newtype qualified type where'; 11 12 this.regexList = [ 13 { regex: /{-#[\s\S]*?#-}/g, css: 'preprocessor' }, 14 { regex: /--.*/g, css: 'comments' }, // one line comments 15 { regex: /{-(?!\$)[\s\S]*?-}/gm, css: 'comments' }, // multiline comments 16 { regex: /'.'/g, css: 'string' }, // chars 17 { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings 18 { regex: /(-|!|#|\$|%|&|\*|\+|\/|<|=|>|\?|@|\^|\||~|:|\.|\\)+/g, css: 'keyword bold' }, 19 { regex: /`[a-z][a-z0-9_']*`/g, css: 'keyword bold' }, // infix operators 20 { regex: /\b(\d+|0x[0-9a-f]+)\b/gi, css: 'value' }, // integer 21 { regex: /\b\d+(\.\d*)?([eE][+-]?\d+)?\b/gi, css: 'value' }, // floating number 22 { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword bold' } 23 ]; 24 25 this.forHtmlScript({ 26 left : /(<|<)%[@!=]?/g, 27 right : /%(>|>)/g 28 }); 29 } 30 31 Brush.prototype = new SyntaxHighlighter.Highlighter(); 32 Brush.aliases = ['haskell']; 33 34 SyntaxHighlighter.brushes.Haskell = Brush; 35 36 // CommonJS 37 typeof exports != 'undefined' ? (exports.Brush = Brush) : null; 38})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.