Tab "\t" character behaviour in (Win)hugs/ghc

Wolfgang Jeltsch wolfgang@jeltsch.net
Wed, 19 Sep 2001 12:14:59 +0200


Alastair David Reid wrote:
> [...]
> > > What does the language definition say about [tabs]?
> [...]
> The Haskell 1.4 report says what is meant to happen (section 1.5)
> (which was to follow the convention).
>
> The Haskell 98 report omits this section.
>
> I would like to report this omission as a bug in the report.

I don't see this as a bug. I think the convention for outputting a tab 
character should be just to send a tab character to the output device or file 
used. In the first case the output device should decide what to do with the 
tab character.
How should the meaning of tabs be specified? Should the report say that 
outputting a tab means to output some space characters? That would of course 
force a specific layout but would it make impossible to include tab 
characters in Haskell-generated files. Outputting tab characters to files 
should result in tab characters included in the file. Because those 
characters are interpreted in a system-dependent way if the files are later 
sent to an output device they should also be interpreted system-dependent if 
they are written to an output device directly.

> [...]

Wolfgang