Reputation: 185
I'm trying to install stylish-haskell package with
stack install stylish-haskell
but I get "Bad interface file" error.
Here's log of installation:
ptparse-applicative-0.14.3.0.log
Configuring optparse-applicative-0.14.3.0...
Preprocessing library for optparse-applicative-0.14.3.0..
Building library for optparse-applicative-0.14.3.0..
[ 1 of 16] Compiling Options.Applicative.Help.Levenshtein ( Options/Applicative/Help/Levenshtein.hs, .stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1/build/Options/Applicative/Help/Levenshtein.o )
[ 2 of 16] Compiling Options.Applicative.Help.Pretty ( Options/Applicative/Help/Pretty.hs, .stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1/build/Options/Applicative/Help/Pretty.o )
Options/Applicative/Help/Pretty.hs:6:1: error:
Bad interface file: /home/george/.stack/snapshots/x86_64-linux-tinfo6/lts-13.21/8.6.5/lib/x86_64-linux-ghc-8.6.5/ansi-wl-pprint-0.6.8.2-FavuR50rvZs3UXCXkBzL8N/Text/PrettyPrint/ANSI/Leijen.hi
Data.Binary.getPrim: end of file
|
6 | import Text.PrettyPrint.ANSI.Leijen hiding ((<$>), (<>), columns)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Upvotes: 0
Views: 563
Reputation: 185
As duplode has pointed out, this is likely a case of Stack issue #3248. A workaround is stack exec ghc-pkg unregister ansi-wl-pprint-0.6.8.2
followed by stack build
, which will trigger a reinstall of the affected package.
Upvotes: 4