packages feed

calamity 0.1.6.1 → 0.1.6.2

raw patch · 2 files changed

+8/−5 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

calamity.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 8e92a779010033140a384ff887303116946beadaf66f3565d2a1850b65824b5f+-- hash: 508df452f0143768a08aa0154d0b2fdb542f78f4238b4e028793ba91a6865923  name:           calamity-version:        0.1.6.1+version:        0.1.6.2 synopsis:       A library for writing discord bots description:    Please see the README on GitHub at <https://github.com/nitros12/calamity#readme> category:       Network, Web
src/Calamity/Client/Client.hs view
@@ -135,17 +135,20 @@   void . P.runError . forever $ do     evt' <- P.embed $ readChan outc     case evt' of+      -- NOTE: these raise's are needed to raise into the Error effect       Dispatch evt -> P.raise $ handleEvent evt-      Custom s d   -> handleCustomEvent s d+      Custom s d   -> P.raise $ handleCustomEvent s d       ShutDown     -> P.throw ()   debug "leaving client loop"  handleCustomEvent :: forall r. BotC r => TypeRep -> Dynamic -> P.Sem r () handleCustomEvent s d = do-  debug "handling a custom event"+  debug $ "handling a custom event, s: " +|| s ||+ ", d: " +|| d ||+ ""   eventHandlers <- P.atomicGet -  for_ (getCustomEventHandlers s (dynTypeRep d) eventHandlers) (\h -> P.async . fromJust . fromDynamic @(P.Sem r ()) $ dynApp h d)+  let handlers = getCustomEventHandlers s (dynTypeRep d) eventHandlers++  for_ handlers (\h -> P.async . fromJust . fromDynamic @(P.Sem r ()) . fromJust $ dynApply h d)  handleEvent :: BotC r => DispatchData -> P.Sem r () handleEvent data' = do