Skip to content

Support GHC 8.4 for hie-core #2326

Closed
Closed
@ndmitchell

Description

In Haskell it's traditional to support the last two stable releases of GHC, because upgrading can be a time consuming process. Would there be any interest in taking a contribution to allow hie-core to work with GHC 8.4? This would likely mean setting up a separate CI job using something like Travis for hie-core, to ensure it continued to work, and would imply ongoing maintenance. It might also be a good time to split hie-core out, if that is still on the table. To figure out how much work it would take to enable GHC 8.4 support, I started tweaking things, and found:

  • There are a handful of lines around the CPP module and invoking it that need to change.
  • fakeDynFlags has a few less members and slightly different interface.
  • The pretty printing code in findImports would need a slight tweak.
  • The CodeActions requires a 1 line tweak.
  • Spans.Calculate has a bunch of code that has changed and would need more substantial compatibility work. 5 functions change, requiring approx 14 lines of patching.

The diffstat was:

 .../hie-core/src/Development/IDE/Core/Compile.hs     |  2 +-
 compiler/hie-core/src/Development/IDE/GHC/CPP.hs     |  2 ++
 compiler/hie-core/src/Development/IDE/GHC/Util.hs    |  4 ++--
 .../src/Development/IDE/Import/FindImports.hs        |  6 +++---
 .../hie-core/src/Development/IDE/LSP/CodeAction.hs   |  2 +-
 .../hie-core/src/Development/IDE/Spans/Calculate.hs  | 20 +++++++++++---------

Remember that 20 is 10 lines added and 10 removed, but also that in a few places I block commented or replaced with undefined, so the total diff to maintain would be slightly bigger.

CC @katiejots

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