stack module interface files - Haskell

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

James King

So I built ghcide using stack for my project which uses GHC 8.10.1 as I was unable to resolve issues with 8.8.3.

I start a new stack project which gives me the lts-16.1 resolver and I add ghc-8.10.1 as the compiler in my stack.yaml:

resolver: lts-16.1
compiler: ghc-8.10.1

ghcide boots up fine in the environment and works great, compiling works fine but I get this warning:

Warning: Failed to decode module interface:
         C:\Users\foo\Project\bar\.stack-work\dist\a3a5fe88\build\Lib.hi Decoding
         failure: Invalid magic: e49ceb0f

I tried a stack clean but to know avail: anyone know what's happening here? Is it just because of the compiler vs. lts?

Georgi Lyubenov // googleson78

After an extended debugging session with @simonmichael it came to my attention that Stack directly parses GHC's interface files via the hi-file-parser library. This is an unfortunate state of a...