Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,828
    • Issues 4,828
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 447
    • Merge requests 447
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #20573

Closed
Open
Created Oct 28, 2021 by Jakob Brünker@JakobBruenkerDeveloper

Show -Wtabs warnings even when errors are found

The following code

main :: IO ()
main = do
    putStrLn "hello"
	putStrLn "world" // tab character at beginning of line

looks correct in my editor, because it displays tabs as 4 spaces.

However, it results in the error

    • Couldn't match expected type ‘(String -> IO ())
                                    -> [Char] -> IO ()’
                  with actual type ‘IO ()’

If I fix the file, it compiles, but I get the warning

    Tab character found here.
    Please use spaces instead.

It would be nice if this warning were displayed in the first case as well, even though compilation has also produced an error, since the warning points to the cause of the error.

I imagine that this could avoid some confusion for beginners, every once in a while.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking