Skip to content

Commit

Permalink
Merge pull request #5413 from commercialhaskell/5407-warn-duplicate-m…
Browse files Browse the repository at this point in the history
…odules

Warn, not error, on duplicate modules (fixes #5407)
  • Loading branch information
snoyberg authored Oct 15, 2020
2 parents 774eb72 + 5ebd542 commit 2afc9d5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Stack/Ghci.hs
Original file line number Diff line number Diff line change
Expand Up @@ -823,9 +823,11 @@ checkForDuplicateModules :: HasTerm env => [GhciPkgInfo] -> RIO env ()
checkForDuplicateModules pkgs = do
unless (null duplicates) $ do
borderedWarning $ do
prettyError $ "Multiple files use the same module name:" <>
prettyWarn $ "Multiple files use the same module name:" <>
line <> bulletedList (map prettyDuplicate duplicates)
throwM LoadingDuplicateModules
-- MSS 2020-10-13 Disabling, may remove entirely in the future
-- See: https://github.com/commercialhaskell/stack/issues/5407#issuecomment-707339928
-- throwM LoadingDuplicateModules
where
duplicates :: [(ModuleName, Map (Path Abs File) (Set (PackageName, NamedComponent)))]
duplicates =
Expand Down

0 comments on commit 2afc9d5

Please sign in to comment.