goldfirere / singletons

Fake dependent types in Haskell using singletons
285 stars 35 forks source link

Use `GHC2024` in `singletons-th` and `singletons-base` #594

Open RyanGlScott opened 1 month ago

RyanGlScott commented 1 month ago

GHC 9.10 introduces the GHC2024 language extension set. As compared to GHC2021, this enables several additional language extensions by default, and several of these are ones that are commonly sprinkled throughout the code (e.g., DataKinds). Following in the footsteps of https://github.com/goldfirere/singletons/issues/508, we should make GHC2024 the default-language in the .cabal files for singletons-th and singletons-base.

RyanGlScott commented 1 month ago

Note that using GHC2024 requires cabal-install-3.12.0.0 or later, as earlier versions of cabal-install won't recognize it as a default-language:

$ cabal build singletons-th -w ghc-9.10
Resolving dependencies...
Error: cabal: Could not resolve dependencies:
[__0] next goal: singletons-th (user goal)
[__0] rejecting: singletons-th-3.4 (conflict: requires unknown language
GHC2024; did you mean GHC2021?)
[__0] rejecting: singletons-th-3.3, singletons-th-3.2, singletons-th-3.1.1,
singletons-th-3.1, singletons-th-3.0 (constraint from user target requires
==3.4)
[__0] fail (backjumping, conflict set: singletons-th)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: singletons-th

As such, I'll wait until cabal-install-3.12.0.0 is available in ghcup and haskell-ci before doing this.