turion / essence-of-live-coding

Universal Live Coding & Functional Reactive Programming Framework
https://www.manuelbaerenz.de/#computerscience
62 stars 6 forks source link

GHC versions 9.6 and 9.8 #122

Open turion opened 4 months ago

turion commented 4 months ago

These should be supported.

aavogt commented 1 month ago

It builds with ghc-9.8.2 once I add the Typeable t requested below:

src/LiveCoding/Cell/Monad.hs:53:3: error: [GHC-39999]
    • Could not deduce ‘base-4.19.1.0:Data.Typeable.Internal.Typeable
                          t’
        arising from a superclass required to satisfy ‘Data (t s)’,
        arising from the head of a quantified constraint
        arising from a type ambiguity check for
        the type signature for ‘hoistCellKleisliStateChange’
      from the context: (Monad m1, Monad m2,
                         forall s. Data s => Data (t s))
        bound by the type signature for:
                   hoistCellKleisliStateChange :: forall (m1 :: * -> *) (m2 :: * -> *)
                                                         (t :: * -> *) a1 b1 a2 b2.
                                                  (Monad m1, Monad m2,
                                                   forall s. Data s => Data (t s)) =>
                                                  (forall s.
                                                   (s -> a1 -> m1 (b1, s))
                                                   -> t s -> a2 -> m2 (b2, t s))
                                                  -> (forall s. s -> t s)
                                                  -> Cell m1 a1 b1
                                                  -> Cell m2 a2 b2
        at src/LiveCoding/Cell/Monad.hs:(53,3)-(60,15)
      or from: Data s
        bound by a quantified context
        at src/LiveCoding/Cell/Monad.hs:(53,3)-(60,15)
    • In the ambiguity check for ‘hoistCellKleisliStateChange’
      To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
      In the type signature:
        hoistCellKleisliStateChange :: (Monad m1,
                                        Monad m2,
                                        (forall s. Data s => Data (t s))) =>
                                       (forall s.
                                        (s -> a1 -> m1 (b1, s)) -> (t s -> a2 -> m2 (b2, t s)))
                                       -> (forall s. (s -> t s)) -> Cell m1 a1 b1 -> Cell m2 a2 b2
turion commented 1 month ago

That sounds great, do you want to submit a PR?

turion commented 1 month ago

Nevermind, I'll tackle it myself!