Skip to content

Commit

Permalink
Backport HIE files to GHC 8.6 (#689)
Browse files Browse the repository at this point in the history
* Backport HIE files support to 8.6

* Use hie files as source of truth for name source spans.

Since we started reusing `.hi` files, this exposes a bug where definitions
aren't available since a bad source span from the `.hi` file gets put into
the NameCache. We rectify by ensuring the span in the NameCache always matches
the one from the `.hie` file.

This has surfaced because an interaction between the commit which uses `.hi`
instead of retypechecking and the change to use the shared global NameCache
to read `.hie` files.
  • Loading branch information
wz1000 authored Jul 16, 2020
1 parent cbafcf2 commit 993cfdd
Show file tree
Hide file tree
Showing 7 changed files with 3,349 additions and 29 deletions.
8 changes: 8 additions & 0 deletions ghcide.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,14 @@ library
Development.IDE.Plugin.CodeAction.RuleTypes
Development.IDE.Plugin.Completions.Logic
Development.IDE.Plugin.Completions.Types
if (impl(ghc > 8.5) && impl(ghc < 8.7)) && !flag(ghc-lib)
hs-source-dirs: src-ghc86
other-modules:
Development.IDE.GHC.HieAst
Development.IDE.GHC.HieBin
Development.IDE.GHC.HieTypes
Development.IDE.GHC.HieDebug
Development.IDE.GHC.HieUtils
if (impl(ghc > 8.7) && impl(ghc < 8.10)) || flag(ghc-lib)
hs-source-dirs: src-ghc88
other-modules:
Expand Down
Loading

0 comments on commit 993cfdd

Please sign in to comment.