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.
Loading
Please register or sign in to comment