/*
Language: Haskell
Author: Jeremy Hull <sourdrums@gmail.com>
*/

hljs.LANGUAGES.haskell = function(){
  var TYPE = {
    className: 'type',
    begin: '\\b[A-Z][\\w\']*',
    relevance: 0
  };
  var CONTAINER = {
    className: 'container',
    begin: '\\(|{', end: '\\)|}',
    contains: [
      {className: 'type', begin: '\\b[A-Z][\\w\\(\\)\\.\']*'},
      {className: 'title', begin: '[_a-z][\\w\']*'}
    ]
  };

  return {
    defaultMode: {
      keywords:
        'let in if then else case of where do module import hiding qualified type data ' +
        'newtype deriving class instance null not as',
      contains: [
        {
          className: 'comment',
          begin: '--', end: '$'
        },
        {
          className: 'comment',
          begin: '{-', end: '-}'
        },
        {
          className: 'string',
          begin: '\\s+\'', end: '\'',
          contains: [hljs.BACKSLASH_ESCAPE],
          relevance: 0
        },
        hljs.QUOTE_STRING_MODE,
        {
          className: 'import',
          begin: '\\bimport', end: '$',
          keywords: 'import qualified as hiding',
          contains: [CONTAINER],
          illegal: '\\W\\.|;'
        },
        {
          className: 'module',
          begin: '\\bmodule', end: 'where',
          keywords: 'module where',
          contains: [CONTAINER],
          illegal: '\\W\\.|;'
        },
        {
          className: 'class',
          begin: '\\b(class|instance|data|(new)?type)', end: '(where|$)',
          keywords: 'class where instance data type newtype deriving',
          contains: [TYPE]
        },
        hljs.C_NUMBER_MODE,
        {
          className: 'shebang',
          begin: '#!\\/usr\\/bin\\/env\ runhaskell', end: '$'
        },
        TYPE,
        {
          className: 'title', begin: '^[_a-z][\\w\']*'
        }
      ]
    }
  };
}();

@@ -596,18 +596,39 @@
 ce n
-ull n
 ot as
+ foreign ccall safe unsafe
 ',%0A 
@@ -678,32 +678,32 @@
 ame: 'comment',%0A
-
           begin:
@@ -731,32 +731,125 @@
    %7D,%0A        %7B%0A
+          className: 'preprocessor',%0A          begin: '%7B-#', end: '#-%7D'%0A        %7D,%0A        %7B%0A
           classN

Add new keywords and a preprocessor into Haskell