Personal tools

Talk:Hitchhikers guide to Haskell

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(<haskell></haskell> is the correct solution.)
Line 1: Line 1:
 
== Code Indentation: ==
 
== Code Indentation: ==
Code is most easily specified by indenting it by a space in the wiki source:
+
Haskell code should be indented using the &lt;haskell&gt; tag:
   
-- This is some code.
+
http://www.haskell.org/haskellwiki/HaskellWiki:Syntax_highlighting
sq x = x*x
 
   
If two spaces are used to indent, then the code is visually indented:
+
This also allows for proper cut and paste properties.
 
-- Indented code.
 
sq x = x*x
 
 
However, if two spaces are used, then cutting and pasting the code sample will insert a spurious space that breaks the 2D Haskell layout. Unless there is a way of indenting code visually while preserving the cut an paste layout properties, it seems that one should only use a single space to indent wiki code.
 
 
(I did not change the interactive code as it is not likely to be cut and pasted over multiple lines. Visually, however, it might be good to remove the extra space here as well...)
 
   
 
P.S. I am really enjoying this article! It provides a very nice practical introduction to Haskell. Thanks! [[User:Mforbes|Mforbes]] 10:08, 17 April 2006 (UTC)
 
P.S. I am really enjoying this article! It provides a very nice practical introduction to Haskell. Thanks! [[User:Mforbes|Mforbes]] 10:08, 17 April 2006 (UTC)

Revision as of 05:48, 3 May 2006

Code Indentation:

Haskell code should be indented using the <haskell> tag:

http://www.haskell.org/haskellwiki/HaskellWiki:Syntax_highlighting

This also allows for proper cut and paste properties.

P.S. I am really enjoying this article! It provides a very nice practical introduction to Haskell. Thanks! Mforbes 10:08, 17 April 2006 (UTC)