Skip to content
Snippets Groups Projects
Commit 47845856 authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel :man_dancing:
Browse files

Workaround invalid .cabal files with Main modules in other-extensions

`other-modules` is intended for non-main modules (which is also stated
in the cabal manual). Unfortunately, a few packages, such as `happy` do
incorrectly specify `other-modules: Main` for their executables, thereby
causing GHC to complain about duplicate Main modules.

The workaround implemented here is to filter out the main module
name (while taking into account `ghc-options: -main-is ...`) from the
`other-modules` passed to GHC, and emit a warning in the process.
parent e12967c9
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment