views:

235

answers:

6

Hi,

I'm making a blog in PHP and I'd really like to have syntax highlighting on Haskell code.

Are there any tools for that out there?

I've found hscolour but I don't know if it's possible to integrate it in PHP.

I'm using CakePHP if that makes a difference.

Thanks.

+3  A: 

GeSHi is a PHP library that's quite often used for code-highlighting.

Judging from the list of supported languages, it seems it supports Haskell -- and there's a demo page if you want to try first.

(Right now, the website seems not to be responding :-( Still, it's available from Google search's cache)

Pascal MARTIN
+1  A: 

The web site is down at the moment, so I can't confirm, but I am most positive GeSHi has support.

LiraNuna
A: 

Many tools support Haskell syntax highlighting: kate, GeSHI, pygments. Calling into haskell-color or hscolour. Pick whichever is easiest for you to interface with.

Don Stewart
+1  A: 

Here is a Geshi helper for CakePHP: http://www.mech7.net/articles/view/7/cakephp-geshi-helper

FractalizeR
A: 

I really like how GitHub highlights Haskell code, so I hacked at GeSHi's Haskell syntax file for a while until it worked in a similar fashion. It hasn't been heavily tested, but someone might find it useful.

You can download it from my blog entry, GitHub Haskell colours for GeSHi.

Jacob Stanley
A: 

I use SHJS JavaScript syntax highlighter. It is based on on GNU Source-highlight, and highlights more correctly than google-code-prettify and GeSHi.

See also: How to setup SHJS for Haskell.

Comparison, the last time I checked:

jetxee