Conversation
ac0e520 to
abeed16
Compare
|
As a note: let's make sure that we enable GHC 9.4 in the nix-shell for the cabal-based CI. To test both versions. |
073c936 to
0962d29
Compare
0962d29 to
3b04fa3
Compare
It's not tremendously important, but just so you kno, we have dpulls installed in the org, so you can use this to mark dependencies instead of managing them manually. |
|
Depends on #429 |
aspiwack
left a comment
There was a problem hiding this comment.
Just a few minor comments from me before we merge.
|
I now get a build error with Limiting cabal to |
aspiwack
left a comment
There was a problem hiding this comment.
For the --allow-newer issue, I'm ok with tests not working (though I wonder why this particular failure is happening). But you can also use the fixed version in the workflow.
I'm indifferent to the solution. Merge when you have chosen.
This PR allows linear-base to be built with both GHC 9.2 and 9.4. There were two main changes which had to be accounted for: firstly that the
~type equality operator is now a "regular" type operator, exported fromData.Type.Equality, and secondly thatGHC.Genericnow exportsGenericallyandGenerically1.Both of these issues were fixed in a similar way: we defined source directories
ghc92andghc94which are included in the build based on the current GHC version. This allows us to, for example, defineGenericallyin GHC 9.2 builds but re-export it when building with 9.4.One caveat with this approach is that we also had to move the entry point to
Generics.Linearinto one of these shim modules, as it re-exportsGHC.Generic, which meant that we were getting unused import warnings in places that imported bothGenerics.LinearandPrelude.Linear.Internal. This seems like a reasonable cost to pay, especially since it can be removed when support for GHC 9.2 is dropped.