Closed
Description
With HLS 1.5 (using GHC 9.0.1), using the VS Code extension on Windows 10, I'm getting errors when running HLS on the GHC codebase. These errors seem to be caused by a problem loading an hi-boot
interface file.
Running HLS on GHC commit f8c1c549bbb02cb0a943a9ae49dee922c96d85c4, I'm getting the following errors:
Show/hide interface file errors
GHC.Types.ForeignCall:
• No instance for (Eq (GenUnit UnitId))
arising from the third field of ‘StaticTarget’ (type ‘Maybe Unit’)
Possible fix:
use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
• When deriving the instance for (Eq CCallTarget)
• No instance for (Data (GenUnit UnitId))
arising from the third field of ‘StaticTarget’ (type ‘Maybe Unit’)
Possible fix:
use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
• When deriving the instance for (Data CCallTarget)
[...]
GHC.Types.Name:
• Can't find interface-file declaration for variable isInteractiveModule
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
• In the second argument of ‘(||)’, namely
‘isInteractiveModule mod’
In the expression: from == mod || isInteractiveModule mod
In an equation for ‘nameIsLocalOrFrom’:
nameIsLocalOrFrom from name
| Just mod <- nameModule_maybe name
= from == mod || isInteractiveModule mod
| otherwise = True
[...]
GHC.Unit.Info:
• Can't find interface-file declaration for type constructor or class UnitKey
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
• In the first argument of ‘GenUnitInfo’, namely ‘UnitKey’
In the type ‘GenUnitInfo UnitKey’
In the type declaration for ‘UnitKeyInfo’
These all seem to do with failing to load the hi-boot
file for GHC.Unit.Types
.
I have cleared the ghcide cache as well as the _hie_bios
folder, and the error persists. Switching back to HLS 1.4 immediately fixes the problem.