-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GHC-9.8 backwards compatibility? #2379
Comments
I've pushed the change for the first three issues to https://github.com/gergoerdi/liquidhaskell/tree/ghc-9.8-compat I've got code locally that "fixes" the remaining problems (by breaking the GHC 9.10 compatibility), so at least we can know there's no other "unknown unknowns" lurking. |
On the side of costs, we would need to make sure patches pass tests in both compiler versions. The hardest thing to support is probably going to be the move of many definitions from I'd prefer having a separate branch for ghc-9.8 and backporting fixes there when needed, rather than making harder to accept contributions to the For the reference, here is the issue (#2307) and the PR (#2316) about the upgrade to 9.10.1. |
So would you be happy with me starting a new branch off current |
That works. There are two strategies to maintain that:
In either case, I suppose CI will need to be reverted to use GHC 9.8 on that branch. One other thought that comes to mind: it might be worth encapsulating the compatibility changes so the differences between |
#2380 is a good shot at this. I could remove just the CPP parts and then the only diff on the GHC-9.8 branch will be in in what are currently CPP-guarded in #2380. Does this make sense? |
Yes, I think #2380 works. Removing the CPP guards also sounds good to me. I expect the encapsulation to be harder for dealing with annotations, as much of those in |
Could you make a new |
👍 there is a branch |
|
#2430 is removing the explicit dependency on |
I looked at what it would take to still support GHC 9.8 with
develop
as of 5595507 and it's so little that I think it would be feasible with just a little CPP usage to keep supporting 9.8. For comparison, Clash, which is a similarly involved user of the GHC API, manages to support all GHC versions between 8.10 and 9.10.foldl'
is not exported by thePrelude
, so has to be imported fromData.List
. A triviality that affects 8 files. The imports can be guarded by CPP macros if we want to avoid "redundant imports" warnings on GHC 9.10.Unique
s are built fromInt
s, notWord64
s. Handling this difference can be centralized by adding a type alias and some utility functions to some newLiquid.GHC.API.Compat
module.Instead of
GHC.Internal.Foldable
andGHC.Internal.Real
, we haveData.Foldable
andGHC.Real
. Again, can be worked around by defining aliases inLiquid.GHC.API.Compat
.Differences in AST annotations / TTG expansion points: This is very annoying, because it requires CPP branching at five places across three modules.
tcValBinds
has a slightly different type, requiring a change inLanguage.Haskell.Liquid.GHC.Misc.withWiredIn
.Overall, I don't think it would be that big a burden to keep GHC 9.8 around.
The text was updated successfully, but these errors were encountered: