Merge remote-tracking branch 'origin/pr/807'

This commit is contained in:
Julian Ospald 2023-03-15 00:13:54 +08:00
commit 7fa72a8892
Signed by: hasufell
GPG Key ID: 3786C5262ECB4A3F
1 changed files with 6 additions and 0 deletions

View File

@ -77,8 +77,14 @@ runBothE' a1 a2 = do
(_ , VLeft e ) -> throwSomeE e
(VRight _, VRight _) -> pure ()
-- "throwSomeE" function has been upstreamed in haskus-utils-variant-3.3
-- So, only conditionally include this shim if
-- haskus-utils-variant version is < 3.3
#if MIN_VERSION_haskus_utils_variant(3,3,0)
#else
-- | Throw some exception
throwSomeE :: forall es' es a m. (Monad m, LiftVariant es' es) => V es' -> Excepts es m a
{-# INLINABLE throwSomeE #-}
throwSomeE = Excepts . pure . VLeft . liftVariant
#endif