Closed locallycompact closed 2 weeks ago
I also see errors related to TH changes:
[17 of 44] Compiling Polysemy.Internal.TH.Effect ( src/Polysemy/Internal/TH/Effect.hs, dist/build/Polysemy/Internal/TH/Effect.o, dist/build/Polysemy/Internal/TH/Effect.dyn_o )
src/Polysemy/Internal/TH/Effect.hs:140:28: error: [8;;https://errors.haskell.org/messages/GHC-83865GHC-838658;;]
• Couldn't match type ‘Name -> Dec’ with ‘Dec’
Expected: Fixity -> NamespaceSpecifier -> Dec
Actual: Fixity -> NamespaceSpecifier -> Name -> Dec
• Probable cause: ‘InfixD’ is applied to too few arguments
In the first argument of ‘flip’, namely ‘InfixD’
In the second argument of ‘(.)’, namely
‘flip InfixD (cliFunName cli)’
In the second argument of ‘maybe’, namely
‘(pure . flip InfixD (cliFunName cli))’
|
140 | = maybe [] (pure . flip InfixD (cliFunName cli)) (cliFunFixity cli)
| ^^^^^^
The fix for the error above is really simple:
diff --git a/vendor/polysemy/src/Polysemy/Internal/TH/Effect.hs b/vendor/polysemy/src/Polysemy/Internal/TH/Effect.hs
index c4df68da3..bb8051326 100644
--- a/vendor/polysemy/src/Polysemy/Internal/TH/Effect.hs
+++ b/vendor/polysemy/src/Polysemy/Internal/TH/Effect.hs
@@ -137,7 +137,11 @@ genFreer should_mk_sigs type_name = do
-- its body on effect's data constructor.
genSig :: ConLiftInfo -> [Dec]
genSig cli
- = maybe [] (pure . flip InfixD (cliFunName cli)) (cliFunFixity cli)
+#if __GLASGOW_HASKELL__ >= 910
+ = maybe [] (\fixity -> pure $ InfixD fixity NoNamespaceSpecifier (cliFunName cli)) (cliFunFixity cli)
+#else
+ = maybe [] (\fixity -> pure $ InfixD fixity (cliFunName cli)) (cliFunFixity cli)
+#endif
++ [ SigD (cliFunName cli) $ quantifyType
$ ForallT [] (member_cxt : cliFunCxt cli)
$ foldArrowTs sem
I didn't look into the warning, but that will get the library compiling at least.
I think that warning has always been there, hasn't it? Gotta research which GHC versions need that match.
Anyway, I added the TH fix, but I don't have 9.10 available, so someone's gotta test this.
You can get a 9.10.1 shell for polysemy directly from horizon by doing:
nix develop 'git
+https://gitlab.horizon-haskell.net/package-sets/horizon-advance#polysemy.env'
Run ghc-pkg list
to see what it pulled.
thanks. I'm getting
conflict: ghc-tcplugins-extra => ghc>=7.10 && <9.10
although I saw that there's a patch in the repo that's supposed to jailbreak this
added some CPP for the warning as well
I would be happy to test but I can't tell what branch or commit I should use. I don't see a linked PR ...
@m4dc4p it's in master
Can confirm this builds with 9.10.1!
alright, uploaded a release!
https://gitlab.horizon-haskell.net/package-sets/horizon-advance/-/jobs/1417118#L185