chore(versionbump): Add Instance, fix redundant import problems.

This commit is contained in:
Stephan Barth 2024-10-07 15:54:48 +02:00
parent cd66e5827a
commit eca7949da4
2 changed files with 3 additions and 1 deletions

View File

@ -5,6 +5,7 @@
{-# LANGUAGE UndecidableInstances #-} -- for `MonadCrypto` and `MonadSecretBox`
{-# LANGUAGE InstanceSigs #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} -- otherwise, (Monad m, MonadSite UniWorX m) => MonadSecretBox m complains about redundant Monad m, but MonadSite UniWorX m comlains that Monad m is not deduceable
module Foundation.Instances
( ButtonClass(..), YesodPersistBackend, AuthId, MonadCryptoKey

View File

@ -25,6 +25,7 @@ import qualified Data.List.NonEmpty as NonEmpty
import qualified Data.HashMap.Strict as HashMap
import qualified Data.Aeson as Aeson
import qualified Data.Aeson.KeyMap as KeyMap
import Control.Monad.Random (evalRand, mkStdGen, uniform)
@ -109,7 +110,7 @@ queueJobUnsafe queuedJobWriteLastExec job = do
JobNoQueueSame -> E.where_ $ queuedJob E.^. QueuedJobContent E.==. E.val (toJSON job)
JobNoQueueSameTag ->
let Aeson.Object obj = toJSON job
tag = obj HashMap.! "job"
tag = obj KeyMap.!? "job"
in E.where_ $ (queuedJob E.^. QueuedJobContent) E.->. "job" E.==. E.val tag
if