Use of tab characters in indentation-sensitive code

Graham Klyne gk at
Thu Jan 22 22:16:31 EST 2004

I have found on a number of occasions that the use of tab characters in 
indentation-sensitive code is a cause of compilation errors, on occasions 
where I have opened the file with an editor which ap0plies a convention 
other than 8 spaces for a tab.  I fear that sooner or later, one of these 
errors is going to manifest as a logic error.

I would suggest that, where code uses the indentation-scope feature of 
Haskell, it would reduce the possibility for errors of all tabs were 
replaced with a corresponding number of spaces.

I think that compilers should issue a warning when indentation that 
determines the scope of a construct is found to contain tab characters.


Graham Klyne
For email:

More information about the Haskell mailing list