Personal tools

HaskellWiki:Community

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(Syntax highlighting)
Line 20: Line 20:
 
== Syntax highlighting ==
 
== 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 <code>&lt;pre-lisp&gt;</code>...<code>&lt;/pre-lisp&gt;</code> to format a block of lisp (using the <code>&lt;pre&gt;</code> tag), and <code>&lt;code-lisp&gt;</code>...<code>&lt;/code-lisp&gt;</code> to format text inline (using the <code>&lt;code&gt;</code> tag).
+
See [[HaskellWiki:Syntax highlighting]].
 
For Haskell, I've made <code>&lt;haskell&gt;</code> the same as <code>&lt;pre-haskell&gt;</code> and <code>&lt;hask&gt;</code> the same as <code>&lt;code-haskell&gt;</code>.
 
 
For instance:
 
 
<haskell>
 
{-
 
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")
 
</haskell>
 
 
Inline: <hask>import Prelude</hask>.
 
 
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. &mdash;[[User:Ashley Y|Ashley Y]] 23:22, 8 March 2006 (UTC)
 
 
There's still some work to do on it. &mdash;[[User:Ashley Y|Ashley Y]] 18:07, 9 March 2006 (UTC)
 

Revision as of 07:28, 10 March 2006

Contents

1 Licensing

Please have a look at the licensing information.

2 Subpages

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

3 Special pages

Here are some special pages that may come in handy:

4 Syntax highlighting

See HaskellWiki:Syntax highlighting.