ekmett / ad

Automatic Differentiation
http://hackage.haskell.org/package/ad
BSD 3-Clause "New" or "Revised" License
372 stars 73 forks source link

Not building with GHC 9.6.1-alpha3 #102

Closed konn closed 1 year ago

konn commented 1 year ago

It seems that ad-4.6.3 on hackage and current HEAD (b69fc5659fe886cad9ee10cc42f4472b36595e8c) both fails to compile with GHC 9.6.1-alpha3 (9.6.0.20230210):

src/Numeric/AD/Internal/On.hs:40:10: error: [GHC-39999]
    • Could not deduce ‘Num (Scalar (Scalar t))’
        arising from the superclasses of an instance declaration
      from the context: (Mode t, Mode (Scalar t))
        bound by the instance declaration
        at src/Numeric/AD/Internal/On.hs:40:10-49
      Possible fix:
        If the constraint looks soluble from a superclass of the instance context,
        read 'Undecidable instances and loopy superclasses' in the user manual
    • In the instance declaration for ‘Mode (On t)’
   |
40 | instance (Mode t, Mode (Scalar t)) => Mode (On t) where
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RyanGlScott commented 1 year ago

I've uploaded ad-4.5.4 to Hackage with a fix.