Skip to content
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.4 checklist #157

Closed
4 tasks done
RyanGlScott opened this issue Nov 10, 2021 · 6 comments
Closed
4 tasks done

GHC 9.4 checklist #157

RyanGlScott opened this issue Nov 10, 2021 · 6 comments

Comments

@RyanGlScott
Copy link
Collaborator

RyanGlScott commented Nov 10, 2021

This issue serves as a reminder to do certain things before we ship a new major release that supports GHC 9.4:

RyanGlScott added a commit that referenced this issue May 19, 2022
We desugar `PromotedInfixT` to applications of `DConT` to two arguments,
mirroring the existing treatment for `InfixT`. By a similar token, attempting
to desugar `PromotedUInfixT` results in an error, just like what would happen
if you attempt to desugar `UInfixT` today.

Addresses one part of #157.
RyanGlScott added a commit that referenced this issue May 19, 2022
Template Haskell support for `default` declarations was added in GHC 9.4.

Addresses one part of #157.
RyanGlScott added a commit that referenced this issue May 19, 2022
The `OPAQUE` pragma was introduced in GHC 9.4.

TODO RGS: Add test case once https://gitlab.haskell.org/ghc/ghc/-/issues/21463 is fixed upstream

Addresses one part of #157.
RyanGlScott added a commit that referenced this issue May 19, 2022
We desugar `\cases` expressions to ordinary lambda expressions, much like
`\case` expressions are currently desguared.

Addresses one part of #157.
RyanGlScott added a commit that referenced this issue May 31, 2022
The `OPAQUE` pragma was introduced in GHC 9.4.

Addresses one part of #157.
RyanGlScott added a commit that referenced this issue May 31, 2022
We desugar `\cases` expressions to ordinary lambda expressions, much like
`\case` expressions are currently desguared.

Addresses one part of #157.
RyanGlScott added a commit that referenced this issue May 31, 2022
We desugar `PromotedInfixT` to applications of `DConT` to two arguments,
mirroring the existing treatment for `InfixT`. By a similar token, attempting
to desugar `PromotedUInfixT` results in an error, just like what would happen
if you attempt to desugar `UInfixT` today.

Addresses one part of #157.
RyanGlScott added a commit that referenced this issue May 31, 2022
Template Haskell support for `default` declarations was added in GHC 9.4.

Addresses one part of #157.
RyanGlScott added a commit that referenced this issue May 31, 2022
The `OPAQUE` pragma was introduced in GHC 9.4.

Addresses one part of #157.
RyanGlScott added a commit that referenced this issue May 31, 2022
We desugar `\cases` expressions to ordinary lambda expressions, much like
`\case` expressions are currently desguared.

Addresses one part of #157.
RyanGlScott added a commit that referenced this issue Jun 7, 2022
We desugar `PromotedInfixT` to applications of `DConT` to two arguments,
mirroring the existing treatment for `InfixT`. By a similar token, attempting
to desugar `PromotedUInfixT` results in an error, just like what would happen
if you attempt to desugar `UInfixT` today.

Addresses one part of #157.
RyanGlScott added a commit that referenced this issue Jun 7, 2022
Template Haskell support for `default` declarations was added in GHC 9.4.

Addresses one part of #157.
RyanGlScott added a commit that referenced this issue Jun 7, 2022
The `OPAQUE` pragma was introduced in GHC 9.4.

Addresses one part of #157.
RyanGlScott added a commit that referenced this issue Jun 7, 2022
We desugar `\cases` expressions to ordinary lambda expressions, much like
`\case` expressions are currently desguared.

Addresses one part of #157.
@RyanGlScott
Copy link
Collaborator Author

At this point, the only thing holding back a new release is the th-lift-instances dependency. It currently does not build with containers-0.6.6 (bundled with GHC 9.4) due to bennofs/th-lift-instances#32.

@ysangkok
Copy link

@RyanGlScott Is that dependency still needed? I see in the README that the minimum required version of GHC is 8.0.

Seems like the library is only needed with really old versions of GHC, as can be seen in phadej/file-embed-lzma#11.

This patch seems to make it compile with 9.4.1:

diff --git a/Language/Haskell/TH/Desugar/Lift.hs b/Language/Haskell/TH/Desugar/Lift.hs
index 50bb7e9..980bd24 100644
--- a/Language/Haskell/TH/Desugar/Lift.hs
+++ b/Language/Haskell/TH/Desugar/Lift.hs
@@ -20,7 +20,6 @@
 module Language.Haskell.TH.Desugar.Lift () where
 
 import Language.Haskell.TH.Desugar
-import Language.Haskell.TH.Instances ()
 import Language.Haskell.TH.Lift
 
 $(deriveLiftMany [ ''DExp, ''DPat, ''DType, ''DForallTelescope, ''DTyVarBndr
diff --git a/th-desugar.cabal b/th-desugar.cabal
index 234b8a7..59226fc 100644
--- a/th-desugar.cabal
+++ b/th-desugar.cabal
@@ -45,7 +45,7 @@ library
   build-depends:
       base >= 4.9 && < 5,
       ghc-prim,
-      template-haskell >= 2.11 && < 2.19,
+      template-haskell >= 2.11 && < 2.20,
       containers >= 0.5,
       mtl >= 2.1 && < 2.4,
       ordered-containers >= 0.2.2,

The tests don't compile though, since th-orphans depends on th-lift-instances.

@RyanGlScott
Copy link
Collaborator Author

I'm a bit confused by #157 (comment), as Language.Haskell.TH.Instances comes from th-orphans, not th-lift-instances. (Confusing, I know.) We certainly can't remove the th-orphans dependency, as it provides Quasi instances that are used in Language.Haskell.TH.Desugar.Reify.

@ysangkok
Copy link

ysangkok commented Aug 21, 2022

Oh, I think this might be a cabal-install bug. It seems it does find the conflict if I provide --constraint='containers==0.6.6'. Sorry for this noise. I suppose one option would be to make the dependency conditional in th-orphans, but that is not a discussion to be had here.

@ysangkok
Copy link

Th-orphans was updated to not require th-lift-instances for ghc versions relevant to th-desugar: mgsloan/th-orphans#38

@RyanGlScott
Copy link
Collaborator Author

Thanks!

I've uploaded th-desugar-1.14 to Hackage, which is compatible with GHC 9.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants