Skip to content

Commit

Permalink
Fix sol#406 by nubbing module list generated from source files
Browse files Browse the repository at this point in the history
Inserting a `nub` here is strictly improving the state of affairs,
since cabal chokes on a module list with duplicates.

This patch might also fix sol#353.
  • Loading branch information
andreasabel committed Nov 10, 2020
1 parent bf35214 commit e2a0be9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Hpack/Module.hs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ getModules dir src_ = sortModules <$> do
if exists
then do
src <- Directory.canonicalizePath (dir </> src_)
removeSetup src . map toModule <$> getModuleFilesRecursive src
removeSetup src . nub . map toModule <$> getModuleFilesRecursive src
else return []
where
removeSetup :: FilePath -> [Module] -> [Module]
Expand Down

0 comments on commit e2a0be9

Please sign in to comment.