
29 Nov
2005
29 Nov
'05
8:06 a.m.
Malcolm Wallace wrote:
mempko
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?