<br><br>
<div class="gmail_quote">2009/3/2 7stud <span dir="ltr"><<a href="mailto:bbxx789_05ss@yahoo.com">bbxx789_05ss@yahoo.com</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I get indenting errors with the following attempts to use let:<br></blockquote>
<div>... three failed exaopmles and a good one ...</div>
<div> </div>
<div>
<div><br>But I would like to know how to use let.<br></div></div>
<div> </div>
<div>
<div>
<div>From beginner to beginner, they look to me more as syntax errors than indentation problem.</div></div>
<div>
<div>The syntax for let is </div>
<div> let { decl ; ... decl } in expression</div>
<div> or in layout format</div>
<div> let decl</div>
<div> ...</div>
<div> decl</div>
<div> in expression</div>
<div> </div>
<div>and your attempts do not respect this syntax. In all three cases, after the keyword 'in' you need a full expression,</div>
<div>and neither a where clause nor a set of matches are a full expression by themselves. An expression is either a function apllication or a 'statement' like if or case, or maybe something more I can't recall.</div>
<div> </div>
<div>In my haskell exercises I really appreciate the fact that the haskell mode of emacs has syntax hints (also</div>
<div>function hints for functions in the prelude). Even now that I know haskell basic syntax, I find it helpful. </div>
<div> </div>
<div>Don't know of any other editors with the same capability for haskell, though, and if you are not an emacs user, learning </div>
<div>the not-so-standard ways of emacs might offset the benefits of having syntax hints. </div></div></div>
<div> </div>
<div>Ciao</div>
<div>---------</div>
<div>FB</div>
<div> </div></div>