RE: [Haskell] Re: Use of tab characters in indentation-sensitive code
{-# 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.
-----Original Message----- From: Ronan Klyne [mailto:ronan@ninebynine.org] Sent: 26 January 2004 03:53 To: The Haskell Mailing List Subject: [Haskell] Re: Use of tab characters in indentation-sensitive code
I support the idea that somthing should be done. I would like to suggest that the compiler references an environment variable to determine how many spaces a tab represents. I realise that this would cause the same code to run on some systems and fail on others, but it would allow a developer to set up a comfortable working system without tab characters ruining the logic of a program.
# r
***************************************************************** Confidentiality Note: The information contained in this message, and any attachments, may contain confidential and/or privileged material. It is intended solely for the person(s) or entity to which it is addressed. Any review, retransmission, dissemination, or taking of any action in reliance upon this information by persons or entities other than the intended recipient(s) is prohibited. If you received this in error, please contact the sender and delete the material from any computer. ***************************************************************** ________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs Email Security System. For more information on a proactive email security service working around the clock, around the globe, visit http://www.messagelabs.com ________________________________________________________________________
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@virgin.net>
participants (2)
-
Bayley, Alistair -
Glynn Clements