[Haskell-cafe] stack: duplicate modules in library

Chris Reade chrisreade at mac.com
Fri Jan 22 14:09:57 UTC 2021


Solved - thanks to suggestions from Sebastiaan Joosten.
A syntax error (missing hyphens) in package.yaml file was creating duplicates in the .cabal file.
So nothing to do with cached binary at all.

Chris

> On 21 Jan 2021, at 13:57, Chris Reade <chrisreade at mac.com> wrote:
> 
> I have come across a problem with haskell stack putting duplicate modules in a library. 
> 
> On "stack build" I get
> 
> "Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.4: Duplicate modules in library:..”
> 
> This may have originally been caused when I changed capitalisation of a filename, but changing back did not resolve the problem.
> 
> My question is how do I get rid of the library so I can rebuild?
> I tried "stack purge” and also removing ~/.stack with no luck 
> (the latter causes a new ghc download on stack build, but with the same message afterwards)
> 
> I know the source modules are fine because they all load in "stack ghci”
> Is there some other directory that stack/cabal uses for binary cache that I can safely delete?
> 
> Chris
> 
> 
> 


More information about the Haskell-Cafe mailing list