Skip to content
GitLab
Projects Groups Snippets
  • /
  • 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 5,244
    • Issues 5,244
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 567
    • Merge requests 567
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #10895
Closed
Open
Issue created Sep 18, 2015 by gershomb@trac-gershombContributor

"no output will be generated" should be an error, not a warning.

Consider a file "Test.hs" which has a "main" function but is declared as "module Test where..."

If we attempt to compile it with for example "ghc --make Test.hs -o Test", we get the following warning:

Warning: output was redirected with -o, but no output will be generated because there is no Main module.

This should be upgraded from a warning to an error. This would help e.g. Cabal, because such warnings do not lead to a failure of the wrapping Cabal process, which is confusing to end-users.

For gory details, see e.g. discussion at https://github.com/haskell/cabal/issues/1847

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