-
Notifications
You must be signed in to change notification settings - Fork 271
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
Prepare for GHC 9.2.* upgrade #3304
Conversation
7102b19
to
e38ae1e
Compare
e38ae1e
to
b0345a3
Compare
-- Call False n as | ||
-- | False -- known unsaturated call | ||
-- = | ||
-- Ins (Name (Env n 0) as) $ Yield (BArg1 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dolio Were these "always failing" case matches here for a reason? They're triggering 'redundant match' in GHC 9.2.3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They were just there to remind me to some day implement that feature. I don't think it's a great loss to just remove them, or comment them.
afbc34d
to
4652149
Compare
Looks like HLS isn't fully supported on 9.2.3 yet, I think we should wait until we have case-splitting at least since that's handy; I tried upgrading to 9.0.2, but that's a no-go due to a QuantifiedConstraints bug (I linked the issue in the PR description). I'll probably just remove the actual GHC upgrade and we can merge all the busy-work, that way we're ready to upgrade whenever HLS catches up 👍🏼 |
These are all the changes which are incompatible between 8.10.7 and GHC 9.2.3
@@ -261,14 +261,7 @@ pretty0 | |||
| otherwise -> | |||
paren (p >= 11 || isBlock x && p >= 3) $ | |||
fmt S.DelayForceChar (l "'") | |||
<> ( case x of | |||
Lets' _ _ -> id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This case is impossible because of the earlier pattern match on Lets'
against x
.
GHC 9.2.3 is smart enough to detect that and issues a warning here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should keep that deleted comment
@@ -997,7 +999,9 @@ wantRequest :: | |||
Term v loc -> | |||
Type v loc -> | |||
(Type v loc, Wanted v loc) | |||
wantRequest loc ~(Type.Effect'' es t) = (t, fmap (Just loc,) es) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GHC got confused and even though this pattern is irrefutable it wouldn't believe that the patterns were exhaustive, even if I added the COMPLETE
pragma for Effect''
, so I just used unEffect0
instead, which is all that the Effect''
pattern does.
@@ -141,7 +141,7 @@ instance Show Stanza where | |||
API apiRequests -> | |||
"```api\n" | |||
<> ( apiRequests | |||
& fmap (\(GetRequest txt) -> Text.unpack txt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This uni-pattern was actually a bug in the transcript parser before, 9.2.3 caught it 🎉
@@ -32,4 +32,6 @@ reference_ = | |||
|
|||
toShortHash :: ConstructorReference -> ShortHash | |||
toShortHash (ConstructorReference r i) = | |||
(Reference.toShortHash r) {ShortHash.cid = Just (tShow i)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a partial record update before.
@@ -0,0 +1,71 @@ | |||
{-# LANGUAGE ExistentialQuantification #-} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was deleted on trunk; accidentally added back in a merge?
Overview
Instead of upgrading actual GHC, this is now a patch containing all the changes which will be necessary for the upgrade. It looks like HLS support will be coming soon, and we can complete the upgrade at that time by reverting this commit
Upgrades to GHC 9.2.3We'll want to upgrade Enlil at the same time: https://github.com/unisoncomputing/enlil/pull/74Built on #3117
Implementation notes
error
, so now I could delete them 👌🏼 )error
's<>
to be defined instead ofmappend
)Loose Ends
When we're ready to upgrade we can simply revert this commit to complete the process.
This change is