'''Syntax highlighting''' works for a bunch of languages including Haskell, using [http://qbnz.com/highlighter/ GeSHi] and Jason Dagit's Haskell file, somewhat modified.

+

'''Syntax highlighting''' works for a bunch of languages including Haskell, using [http://qbnz.com/highlighter/ GeSHi] and [http://web.archive.org/web/20070503183148/http://www.codersbase.com/index.php/Geshi_haskell Jason Dagit's Haskell file], somewhat modified.

== Block formatting with <code>&lt;haskell&gt;</code> ==

== Block formatting with <code>&lt;haskell&gt;</code> ==

Line 11:

Line 11:

import Prelude

import Prelude

−

foo :: (Monad m) -> m (Int,Int)

+

foo :: (Monad m) => m (Int,Int)

foo = (x-2,x - 1) where

foo = (x-2,x - 1) where

x = 3

x = 3

Line 27:

Line 27:

Inline highlighting is a bit of a hack at the moment, and may be buggy.

Inline highlighting is a bit of a hack at the moment, and may be buggy.

:I would recommend using the &lt;code&gt; tag instead which seems to do less damage. Though that page that [[User:Benmachine|benmachine]] has linked to now seems fine to me, I've noticed that use of &lt;hask&gt; within a paragraph will result in poor spacing against surrounding paragraphs and &lt;haskell&gt; blocks. Essentially, having &lt;hask&gt; seems to result in the text not being put in a paragraph &lt;p&gt; block -- [[User:Michael Jones|Michael Jones]] 13 December 2013

I would recommend using the <code> tag instead which seems to do less damage. Though that page that benmachine has linked to now seems fine to me, I've noticed that use of <hask> within a paragraph will result in poor spacing against surrounding paragraphs and <haskell> blocks. Essentially, having <hask> seems to result in the text not being put in a paragraph <p> block -- Michael Jones 13 December 2013

This works for certain other languages too. For lisp, for instance, use <pre-lisp>...</pre-lisp> to format a block of lisp, and <code-lisp>...</code-lisp> to format text inline. <haskell> is the same as <pre-haskell> and <hask> is the same as <code-haskell>.