Skip to content

Commit

Permalink
Only add Alternative (P.Either String) instance for transformers >= 0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjm committed Jul 24, 2024
1 parent ada2154 commit dd83d02
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/DockerEngine/Core.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleInstances #-}
{-
Docker Engine API
Expand Down Expand Up @@ -447,10 +447,12 @@ instance P.Show DateTime where
instance MimeRender MimeMultipartFormData DateTime where
mimeRender _ = mimeRenderDefaultMultipartFormData

#if MIN_VERSION_transformers(0,6,0)
instance Alternative (P.Either String) where

Check warning on line 451 in lib/DockerEngine/Core.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest / ghc 9.6.2

Orphan instance: instance Alternative (P.Either String)

Check warning on line 451 in lib/DockerEngine/Core.hs

View workflow job for this annotation

GitHub Actions / windows-latest / ghc 9.6.2

Orphan instance: instance Alternative (P.Either String)

Check warning on line 451 in lib/DockerEngine/Core.hs

View workflow job for this annotation

GitHub Actions / macOS-latest / ghc 9.6.2

Orphan instance: instance Alternative (P.Either String)
empty = P.Left ""
P.Left _ <|> n = n
m <|> _ = m
#endif

-- | @_parseISO8601@
_readDateTime :: (TI.ParseTime t, Monad m, Alternative m, P.MonadFail m) => String -> m t
Expand Down

0 comments on commit dd83d02

Please sign in to comment.