Trying to install hlint by stack got "same package name" error

Viewed 340

I'm trying to install hlint through stack in haskell stack install hlint, but it advised me that the plan failed and I should add some extra-deps in stack.yaml.

After i did that (and set allow-newer: true in config.yaml) , it returned to me the following:

    The same package name is used in multiple local packages

time used in:
- PLImmutable (PLIHackage (PackageIdentifier {pkgName = PackageName "time", pkgVersion = mkVersion [1,10]}) 536801b30aa2ce66da07cb19847827662650907efb2af4c8bef0a6276445075f,5738 (TreeKey 1591d9d1034f19cd38fbda525969f805b5ca083b45da85602cf2b04c1a82f640,6693))
- PLImmutable (PLIHackage (PackageIdentifier {pkgName = PackageName "time", pkgVersion = mkVersion [1,11,1,2]}) a957467595420495c2dd440d9efa1f58c62277cf9438c7e7a515d7a4c65571ec,6287 (TreeKey b7025dd19573d4c082d072eaba093a3fc1f891f3fde09b59561bcdca3566a0a4,7048))

I don't know how to make it right, since the cmd didn't gave me any new instructions. Help?

1 Answers

Installing things with the global stack.yaml/config.yaml can be tricky. It's often better to clone the package repo and build it using its own config files, which specify the package's preferred Stack resolver etc. Try this:

git clone git@github.com:ndmitchell/hlint.git
# Or: git clone https://github.com/ndmitchell/hlint.git

cd hlint
git checkout v3.3.1 # Latest available release
stack install
Related