Skip to content

Instance declarations in hs-boot files result in GHC errors #723

Closed
@simmsb

Description

@simmsb

Hi, I've come across this issue where any hs-boot file containing instance
declarations results in the following error on the module:

File:     /home/ben/dev/ghcide_boot_file/src/X.hs-boot
Hidden:   no
Range:    1:1-2:1
Source:   compile
Severity: DsError
Message: 
  Compilation Issue
  lookup_final_id

  $fxShowY
  Call stack:
  CallStack (from HasCallStack):
  callStackDoc, called at compiler/utils/Outputable.hs:1159:37 in ghc:Outputable
  pprPanic, called at compiler/main/TidyPgm.hs:201:12 in ghc:TidyPgm
  Please report this bug to the compiler authors.

This causes any modules dependent on the hs-boot module to also fail.

For reference:

  • X.hs-boot
module X (Y) where

data Y

instance Show Y
instance Eq Y
  • X.hs
module X (Y) where

data Y = Y
  deriving (Show, Eq)

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: ghcidetype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions