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

Glynn Clements glynn.clements at virgin.net
Mon Jan 26 10:02:26 EST 2004

Bayley, Alistair wrote:

> {-# OPTIONS -tabsize 4 #-}
> I think it's still a bit of a hack, but at least the author tells you what
> their tabsize was when they wrote it, so you can recover their layout. You
> could always pre-process the source yourself with sed, if the compiler
> doesn't understand the option.

Using "pr -T -e4" is less work than writing a sed script (you can't
just replace each tab with 4 spaces; you need to use between 1 and 4
spaces depending upon the column in which the tab character occurs).

Glynn Clements <glynn.clements at virgin.net>

More information about the Haskell mailing list