Skip to content

interface-file errors when using Template Haskell since ghcide 0.2.0 #891

@maralorn

Description

@maralorn

I have a project that compiles with cabal and often works without a problem with ghcide.
But sometimes I see issues like this:

 [typecheck] [E] • Can't find interface-file declaration for data constructor SortPosition
    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

I have seen this at different positions in my code, but sadly, also because of the heisenbugishness of this bug, I couldn‘t construct a minimal failing example yet.

This issue didn‘t happen on ghcide 0.1.0.

On thing of note: I have only met this issue on data constructors that where called like the Type they inhabit. Renaming the Type fixed the problem for me. But that might just have been luck.

EDIT: The Type is generated via Template Haskell.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions