new to haskell-not working for some reason

Hal Daume III hdaume@ISI.EDU
Wed, 25 Sep 2002 07:44:33 -0700 (PDT)


Among other things, please make sure your layout lines up.  Also, you
cannot have the definition of getText at the same indentation of
"userText<-getText" otherwise your compiler will think this is part of the
do statement (I believe):

> main=do userText<-getText
> ----------------------------------------------------------------------------
> -------
> ________getText::IO String
> ________getText=do nc<-getText
> _______________________return (:nc)


these need to be lined up

> _________________do putSpc (length Room)
> _________________return(RoomLength)


It would help if you also posted the error messaage the compiler gave you
and the line number and (perhaps) a shorter version of the program.

 - Hal