clash-lang / ghc-typelits-natnormalise

Normalise GHC.TypeLits.Nat equations
Other
43 stars 15 forks source link

Does not compile with GHC 9.4.2 #69

Closed Mikolaj closed 1 year ago

Mikolaj commented 2 years ago

Here's the log:

Building library for ghc-typelits-natnormalise-0.7.6..
[1 of 3] Compiling GHC.TypeLits.Normalise.SOP ( src/GHC/TypeLits/Normalise/SOP.hs, dist/build/GHC/TypeLits/Normalise/SOP.o, dist/build/GHC/TypeLits/Normalise/SOP.dyn_o )
[2 of 3] Compiling GHC.TypeLits.Normalise.Unify ( src/GHC/TypeLits/Normalise/Unify.hs, dist/build/GHC/TypeLits/Normalise/Unify.o, dist/build/GHC/TypeLits/Normalise/Unify.dyn_o )
[3 of 3] Compiling GHC.TypeLits.Normalise ( src/GHC/TypeLits/Normalise.hs, dist/build/GHC/TypeLits/Normalise.o, dist/build/GHC/TypeLits/Normalise.dyn_o )

src/GHC/TypeLits/Normalise.hs:211:37: error:
    Module ‘GHC.Tc.Types’ does not export ‘TcPluginResult(..)’
    |
211 | import GHC.Tc.Types (TcPlugin (..), TcPluginResult (..))
    |                                     ^^^^^^^^^^^^^^^^^^^

src/GHC/TypeLits/Normalise.hs:213:47: error:
    Module ‘GHC.Tc.Types.Constraint’ does not export ‘ShadowInfo’
    |
213 |   (Ct, CtEvidence (..), CtLoc, TcEvDest (..), ShadowInfo (WDeriv), ctEvidence,
    |                                               ^^^^^^^^^^^^^^^^^^^

src/GHC/TypeLits/Normalise.hs:214:57: error:
    Module ‘GHC.Tc.Types.Constraint’ does not export ‘setCtLoc’
    |
214 |    ctLoc, ctLocSpan, isGiven, isWanted, mkNonCanonical, setCtLoc, setCtLocSpan,
    |                                                         ^^^^^^^^
Error: cabal: Failed to build ghc-typelits-natnormalise-0.7.6 (which is
required by test:shortTestForCI from horde-ad-0.1.0.0). See the build log
above for details.
christiaanb commented 2 years ago

There’s working code here: https://github.com/clash-lang/ghc-typelits-natnormalise/pull/64

I was kinda hoping to have fixed https://gitlab.haskell.org/ghc/ghc/-/issues/21935 before ghc 9.4 was released before publishing the above PR on hackage. But I guess I’ll release the PR as is.

Mikolaj commented 2 years ago

Oh, yes, that would be so very much cool. :)

Mikolaj commented 2 years ago

I see this is now implemented and merged. Wonderful! So, only a release remains to do?

Mikolaj commented 2 years ago

Thank you so much for the release. I've compiled https://github.com/Mikolaj/horde-ad with this plugin and with ghc-typelits-knownnat in both GHC 9.4.2 and a month old GHC HEAD and now all the hairy dependently typed code compiles fine.

Mikolaj commented 1 year ago

Therefore, let me close.