Skip to content

Ill formatted warning about tabulators

GHC-8.2.0.20170505 does not format warnings about tabulators very well. It seems to use the tab character for formatting, which yields too few spaces when formatted, and in turn too many characters are colored. (It is hard to present the problem in this ticket, though.)

$ cat Tabulator.hs
module Tabulator where

x :: Int
x =
        1*2*3*4*5*6*7*8*9
-- we use a tab for indentation here

$ ghc-8.2.0.20170505 -Wall Tabulator.hs 
[1 of 1] Compiling Tabulator        ( Tabulator.hs, Tabulator.o )

Tabulator.hs:5:1: warning: [-Wtabs]
    Tab character found here.
    Please use spaces instead.
  |
5 |     1*2*3*4*5*6*7*8*9
  | ^^^^^^^^
Trac metadata
Trac field Value
Version 8.2.1-rc1
Type Bug
TypeOfFailure OtherFailure
Priority normal
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