Re: Re : Re : Re : [Haskell-cafe] Indentation woes

2007-08-01 Thread Duncan Coutts
On Wed, 2007-08-01 at 16:05 +0200, david48 wrote: On the topic of indenting, it would be nice if there was a way to tell the compiler the size of the tab characters. The way it is now, I have to use space characters to indent. Good! You're doing exactly the right thing according to the

Re: Re : Re : Re : [Haskell-cafe] Indentation woes

2007-08-01 Thread david48
On the topic of indenting, it would be nice if there was a way to tell the compiler the size of the tab characters. The way it is now, I have to use space characters to indent. It's not really a problem though. ___ Haskell-Cafe mailing list

Re: Re : Re : Re : [Haskell-cafe] Indentation woes

2007-08-01 Thread Brandon S. Allbery KF8NH
On Aug 1, 2007, at 10:05 , david48 wrote: On the topic of indenting, it would be nice if there was a way to tell the compiler the size of the tab characters. The way it is now, I have to use space characters to indent. The problem with that is, while there's a standard for the width of a

Re: Re : Re : Re : [Haskell-cafe] Indentation woes

2007-08-01 Thread david48
On 8/1/07, Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote: On Aug 1, 2007, at 10:05 , david48 wrote: On the topic of indenting, it would be nice if there was a way to tell the compiler the size of the tab characters. The way it is now, I have to use space characters to indent. The

Re: Re : Re : Re : [Haskell-cafe] Indentation woes

2007-07-27 Thread Dougal Stanton
On 27/07/07, anon [EMAIL PROTECTED] wrote: I see what you did there. But you really might as well end sentences with prepositions. Or begin them with conjunction. Or indent your code whichever way seems most natural and elegant because to do otherwise is just prescriptivism for its own sake.

Re: [Haskell-cafe] Indentation woes

2007-07-27 Thread Steve Schafer
On Fri, 27 Jul 2007 00:33:17 -0400, you wrote: What makes this a law? If you notice a pattern where beginners trip against this rule because they don't indent the arms of conditionals properly inside do blocks, should strict adherence to this principle take precendence over the intuition of

Re: Re : [Haskell-cafe] Indentation woes

2007-07-27 Thread Brandon Michael Moore
On Thu, Jul 26, 2007 at 05:34:32PM -0400, anon wrote: 2007/7/26, Stefan O'Rear [EMAIL PROTECTED]: As for why, it's just a matter of Haskell Committee taste. Nothing too deep, just an arbitrary set of rules. That's not much of an explanation, is it? I imagine someone must have given the

Re: [Haskell-cafe] Indentation woes

2007-07-26 Thread Nicolas Frisby
A bandaid suggestion: longFunctionName various and sundry arguments = f where f | guard1 = body1 f | guard2 = body2 | ... where declarations (Disclaimer: untested) As I understand it, there can be guards on the definition of f even if it takes no arguments. Those guards can reference your

Re: [Haskell-cafe] Indentation woes

2007-07-26 Thread Stefan O'Rear
On Thu, Jul 26, 2007 at 02:58:21PM -0500, Nicolas Frisby wrote: A bandaid suggestion: longFunctionName various and sundry arguments = f where f | guard1 = body1 f | guard2 = body2 | ... where declarations (Disclaimer: untested) As I understand it, there can be guards on the

Re: Re : [Haskell-cafe] Indentation woes

2007-07-26 Thread Tillmann Rendel
Stefan O'Rear wrote: Out of curiousity, what do you find objectionable about (legal): function argument argument2 | guard = body | guard = body as compared to (currently illegal): function argument argument2 | guard = body | guard = body I see the vertical strokes as visually lining up,

Re: Re : Re : [Haskell-cafe] Indentation woes

2007-07-26 Thread Ian Lynagh
On Thu, Jul 26, 2007 at 08:17:06PM -0400, anon wrote: but one could likewise dismiss the entire layout business as a needlessly complicated way to save a few keystrokes if one were so inclined. The main point of layout, in my eyes, is to make code more readable. It achieves this both by

Re: Re : Re : [Haskell-cafe] Indentation woes

2007-07-26 Thread ok
Concerning function argument argument2 | guard = body | guard = body I feel that anything that prevents that kind of horror is a great benefit of the current rules and that this benefit must not be lost by any revision of the rules. The Fundamental Law of Indentation is If major syntactic

Re : Re : [Haskell-cafe] Indentation woes

2007-07-26 Thread anon
2007/7/26, Stefan O'Rear [EMAIL PROTECTED]: Out of curiousity, what do you find objectionable about (legal): function argument argument2 | guard = body | guard = body as compared to (currently illegal): function argument argument2 | guard = body | guard = body The extra space, obviously

Re: [Haskell-cafe] Indentation woes

2007-07-26 Thread Nicolas Frisby
Whoops, read too fast. Sorry for the noise. On 7/26/07, Stefan O'Rear [EMAIL PROTECTED] wrote: On Thu, Jul 26, 2007 at 02:58:21PM -0500, Nicolas Frisby wrote: A bandaid suggestion: longFunctionName various and sundry arguments = f where f | guard1 = body1 f | guard2 = body2 | ...

Re: Re : Re : [Haskell-cafe] Indentation woes

2007-07-26 Thread Stefan O'Rear
On Thu, Jul 26, 2007 at 08:17:06PM -0400, anon wrote: 2007/7/26, Stefan O'Rear [EMAIL PROTECTED]: Out of curiousity, what do you find objectionable about (legal): function argument argument2 | guard = body | guard = body as compared to (currently illegal): function argument argument2

Re: Re : [Haskell-cafe] Indentation woes

2007-07-26 Thread Neil Mitchell
Hi Why do you think it should be allowed? The current rules are arbitrary, but they are quite simple; we don't want to add an ad-hoc exception just for this. The current rules are already quite complex, I believe there is some thought being given as to how to simplify them. Out of

Re: [Haskell-cafe] Indentation woes

2007-07-26 Thread Stefan O'Rear
On Thu, Jul 26, 2007 at 02:56:57PM -0400, anon wrote: Greetings, I wish to be able to indent my code like so: longFunctionName various and sundry arguments | guard1 = body1 | guard2 = body2 | ... where declarations That is, with guards and where clauses indented to the same level as the

[Haskell-cafe] Indentation woes

2007-07-26 Thread anon
Greetings, I wish to be able to indent my code like so: longFunctionName various and sundry arguments | guard1 = body1 | guard2 = body2 | ... where declarations That is, with guards and where clauses indented to the same level as the function name. This seems like a perfectly reasonable

Re : [Haskell-cafe] Indentation woes

2007-07-26 Thread anon
2007/7/26, Stefan O'Rear [EMAIL PROTECTED]: As for why, it's just a matter of Haskell Committee taste. Nothing too deep, just an arbitrary set of rules. That's not much of an explanation, is it? I imagine someone must have given the matter some thought before describing the layout rule in

Re: Re : [Haskell-cafe] Indentation woes

2007-07-26 Thread Stefan O'Rear
On Thu, Jul 26, 2007 at 05:34:32PM -0400, anon wrote: 2007/7/26, Stefan O'Rear [EMAIL PROTECTED]: As for why, it's just a matter of Haskell Committee taste. Nothing too deep, just an arbitrary set of rules. That's not much of an explanation, is it? I imagine someone must have given the

Re: [Haskell-cafe] Indentation woes

2007-07-26 Thread Jonathan Cast
On Thursday 26 July 2007, anon wrote: 2007/7/26, Stefan O'Rear [EMAIL PROTECTED]: Out of curiousity, what do you find objectionable about (legal): function argument argument2 | guard = body | guard = body as compared to (currently illegal): function argument argument2 |

Re : Re : Re : [Haskell-cafe] Indentation woes

2007-07-26 Thread anon
2007/7/26, ok [EMAIL PROTECTED]: The Fundamental Law of Indentation is If major syntactic unit X is a proper part of major syntactic unit Y, then every visible character of X is strictly to the right[%] of the leftmost[%] visible character of Y. [%] If you are using a right-to-left

Re: Re : [Haskell-cafe] Indentation woes

2007-07-26 Thread Thomas Conway
On 7/27/07, Neil Mitchell [EMAIL PROTECTED] wrote: Personally, I have no problem with the current way (and would consider anything other than 4 leading spaces in the first example to be evil). However, if you are using a text editor which doesn't automatically indent the start of following