Skip to content

Backpack fails with: Can't find interface-file declaration

Summary

When using an indefinite module to fill in a signature, backpack succeeds. However, it fails later during instantiation with:

typecheckIfaceForInstantiate
Declaration for write#:
  Can't find interface-file declaration for type constructor or class M
    Probable cause: bug in .hi-boot file, or inconsistent .hi file
    Use -ddump-if-trace to get an idea of which file caused the error

At https://github.com/andrewthad/vex-minimal-reproducer, there is a somewhat minimal reproducer. The repo also includes a readme with more detail about the motivation and some investigation of the error itself.

Steps to reproduce

git clone https://github.com/andrewthad/vex-minimal-reproducer
cd vex-minimal-reproducer
cabal v2-build

Expected behavior

The build should succeed.

Environment

  • GHC version used: 8.8.3, 8.10.1rc, HEAD

cc @ezyang

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information