Skip to content

Give Tab warning only once per file

Currently, when compiling a tabbed file, GHC spits out a huge number of warnings:

Main.hs:1:1: Warning: Tab character

[..]

Main.hs:89:1: Warning: Tab character

Main.hs:90:1: Warning: Tab character

Main.hs:91:1: Warning: Tab character

Main.hs:92:1: Warning: Tab character

Main.hs:99:4: Warning: Tab character

Main.hs:100:4: Warning: Tab character

Main.hs:101:4: Warning: Tab character

This is annoying and not very nice to our users.

I suggest to replace it by

This file contains tabs (e.g. line n column m); please use spaces instead

or (to be nice to tools that parse this output)

Main.hs:1:1: Tab found here, and in n further locations. Please use spaces instead.

(This is clearly a low priority request, but also possibly some low-hanging fruit for new contributors.)

Trac metadata
Trac field Value
Version 7.9
Type FeatureRequest
TypeOfFailure OtherFailure
Priority low
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information