[Haskell-cafe] Re: [Haskell] Re: Use of tab characters in indentation-sensitive code

Graham Klyne GK at ninebynine.org
Mon Jan 26 12:29:15 EST 2004

[Switching to Haskell-cafe]

At 11:38 26/01/04 +0100, Andreas Rossberg wrote:
>The most flexible but safe solution is to simply define the indentation as 
>the sequence of indentation characters used. Two consecutive lines are 
>indented consistently whenever one indentation is a prefix of the other. 
>Hence you may freely mix different indentation characters, but you must be 
>consistent across lines. Any decent editor should be able to ensure that.
>With this solution, tab width is irrelevant and indentation may include 
>whatever Unicode has.


But unfortunately I don't think this, or any of the alternatives suggested, 
actually addresses the problem I have encountered, namely when an editing 
environment set up to handle local editing preferences is presented with 
code imported from another environment using different 
conventions.  Conversion of all tabs to spaces (which I do to avoid this 
kind of problem when exporting my code to other environments) can cause 
correct code to become incorrect.

There is, of course, a reasonable argument that my editing environment is 
at fault.


Graham Klyne
For email:

More information about the Haskell-Cafe mailing list