Re: [Haskell-cafe] Re: wxHaskell and do statements

2005-12-02 Thread Sven Panne
Am Dienstag, 29. November 2005 16:16 schrieb Sebastian Sylvan:
 IIRC Haskell assumes a tab is 8 spaces.

Correctly, it is explicitly specified in the Haskell spec, see:

   http://haskell.org/onlinereport/syntax-iso.html#layout

 IMO that's way too much. Haskell tends to take up quite a bit of
 horizontal real-estate so I usually go with 2 spaces.

 At any rate, I set my editor to convert them to spaces.

I think this in general the best idea for all projects, even if the language 
in question has no layout rule. Tabs are simply evil...

Cheers,
   S.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: wxHaskell and do statements

2005-11-29 Thread Sebastian Sylvan
On 11/29/05, mempko [EMAIL PROTECTED] wrote:
 Malcolm Wallace wrote:
  mempko [EMAIL PROTECTED] writes:
 
  Hello, I have a program that just will not compile and I cannot figure
  out why.
 
  Wrong indentation.  Tab stops are 8 spaces in Haskell, but your code
  seems to assume 6 spaces.
 
  -
  module Main where
 
  import Graphics.UI.WX
 
  main :: IO ()
  main = start hello
 
  hello :: IO ()
  hello = do f - frame [text := Super Window]
   lab - staticText f [text:= Hello]
 
  The 'lab -' actually lines up with 'frame', not with 'f -' as intended.
 
  Regards,
  Malcolm


 I found that using ';' at the end of expressions helped and also adding
 a return() statement. You were also right that it did not line up,
 thank you. Now does haskell understand tabs, or does my editor have to
 convert the tabs to spaces?

IIRC Haskell assumes a tab is 8 spaces.
IMO that's way too much. Haskell tends to take up quite a bit of
horizontal real-estate so I usually go with 2 spaces.

At any rate, I set my editor to convert them to spaces.

/S
--
Sebastian Sylvan
+46(0)736-818655
UIN: 44640862
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe