monad-bayes
monad-bayes copied to clipboard
DerivingVia
Use DerivingVia to avoid repetition of lifting instances in Class.hs.
Got a bit of a scary bug:
instance MonadSample m => MonadSample (Id m) where
type Real (Id m) = Real m
random = lift random
deriving via Id m instance MonadSample m => MonadSample (IdentityT m)
" /Users/reubencohn-gordon/Dropbox/Reuben/Programming/monad-bayes/src/Control/Monad/Bayes/Class.hs:359:40: error:ghc-9.2.2: panic! (the 'impossible' happened) (GHC version 9.2.2: No skolem info: [k_aY7N] Call stack: CallStack (from HasCallStack): callStackDoc, called at compiler/GHC/Utils/Panic.hs:181:37 in ghc:GHC.Utils.Panic pprPanic, called at compiler/GHC/Tc/Errors.hs:2912:17 in ghc:GHC.Tc.Errors
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug "