
#9230: Make -fwarn-tabs the default -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: mlen Type: feature | Status: closed request | Milestone: 7.10.1 Priority: normal | Version: 7.8.2 Component: Compiler | Keywords: Resolution: fixed | Architecture: Unknown/Multiple Operating System: | Difficulty: Easy (less than 1 Unknown/Multiple | hour) Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | Blocking: | Differential Revisions: Phab:D255, | Phab:D399 | -------------------------------------+------------------------------------- Comment (by isaacdupree): re: Polarina: Let's try describing a rule that would catch all suspect uses of tabs. Tabs may not be preceded by a non-tab character: that's a start. Let's add: If two adjacent lines have different numbers of tabs, the line with fewer tabs must have a non-whitespace character following the last tab. This way the layout algorithm will never compare the width of a space and a tab (I think). Except that is not enough when layout is begun on the same line as the layout-inducing keyword: {{{ f x = z where y = x + x z = y + y }}} (Personally I consider it bad style to do that even with spaces. If you change the first line before the layout keyword, you need to change the whole layout. Also if you dare to use a non-monospace font it will look wrong. I prefer starting the layout on a new line. [I wish I had a warning for this.]) I think there is a way to warn exactly when the tab width affects layout, but it would have to happen after lexing, and I'm not volunteering to implement it. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9230#comment:31 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler