From dd83d02f45e059db515b0e90f53ddfccafdca494 Mon Sep 17 00:00:00 2001 From: thomasjm Date: Wed, 24 Jul 2024 03:13:56 -0700 Subject: [PATCH] Only add Alternative (P.Either String) instance for transformers >= 0.6 --- lib/DockerEngine/Core.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/DockerEngine/Core.hs b/lib/DockerEngine/Core.hs index 91bfa1e..508a2e2 100644 --- a/lib/DockerEngine/Core.hs +++ b/lib/DockerEngine/Core.hs @@ -1,5 +1,5 @@ -{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE CPP #-} +{-# LANGUAGE FlexibleInstances #-} {- Docker Engine API @@ -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 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