From HaskellWiki
Revision as of 23:22, 8 March 2006 by Ashley Y (talk | contribs)

Jump to: navigation, search


Please have a look at the licensing information.


Subpage support is switched on for all namespaces apart from Image: and MediaWiki:.

Special pages

Here are some special pages that may come in handy:

Syntax highlighting

Syntax highlighting now works (using GeSHi) for a bunch of languages including Haskell (using Jason Dagit's file, somewhat modified). For lisp, for instance, use <pre-lisp>...</pre-lisp> to format a block of lisp (using the <pre> tag), and <code-lisp>...</code-lisp> to format text inline (using the <code> tag).

For Haskell, I've made <haskell> the same as <pre-haskell> and <hask> the same as <code-haskell>.

For instance:

My program
import Prelude

foo :: (Monad m) -> m (Int,Int)
foo = (x-2,x - 1) where
  x = 3

-- The main function
main :: IO ()
main = do
  a <- foo
  putStr ("And the answer is: " ++(show (fst a))++"\n")

Inline: import Prelude.

For Haskell (only) I have deliberately removed all formatting apart from foreground colour, and those I have tried to keep dark so as not to be visually distracting. —Ashley Y 23:22, 8 March 2006 (UTC)