Skip to content

Commit

Permalink
Try fixing more warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjm committed Jun 17, 2024
1 parent 6c89286 commit 24f1dd7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
3 changes: 1 addition & 2 deletions kubernetes-client/src/Kubernetes/Client/Auth/GCP.hs
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ data GCPGetTokenException = GCPCmdProducedInvalidJSON String
instance Exception GCPGetTokenException

getToken :: GCPAuth -> IO (Either GCPGetTokenException Text)
getToken auth@(GCPAuth{..}) = getCurrentToken auth
>>= maybe (fetchToken auth) (return . Right)
getToken auth@(GCPAuth{}) = getCurrentToken auth >>= maybe (fetchToken auth) (return . Right)

getCurrentToken :: GCPAuth -> IO (Maybe Text)
getCurrentToken (GCPAuth{..}) = do
Expand Down
3 changes: 1 addition & 2 deletions kubernetes-client/src/Kubernetes/Client/Internal/TLSUtils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ import Data.ByteString (ByteString)
import Data.Default.Class (def)
import Data.Either (rights)
import Data.Either.Combinators (mapLeft)
import Data.Function ((&))
import Data.PEM (pemContent, pemParseBS)
import Data.X509 (SignedCertificate, decodeSignedCertificate)
import Data.X509.CertificateStore (CertificateStore, makeCertificateStore)
import Lens.Micro
import Lens.Micro ((&), (.~), Lens', lens, set)
import Network.TLS (Credential, credentialLoadX509FromMemory, defaultParamsClient)
import System.X509 (getSystemCertificateStore)

Expand Down
8 changes: 6 additions & 2 deletions kubernetes-client/src/Kubernetes/Client/KubeConfig.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@ This is a mostly straightforward translation into Haskell, with 'FromJSON' and '
module Kubernetes.Client.KubeConfig where

import Data.Aeson (FromJSON (..), Options, ToJSON (..),
Value (..), camelTo2, defaultOptions,
camelTo2, defaultOptions,
fieldLabelModifier, genericParseJSON,
genericToJSON, object, omitNothingFields,
withObject, (.:), (.=))
import qualified Data.Map as Map
import Data.Proxy
import Data.Semigroup ((<>))
import Data.Text (Text)
import qualified Data.Text as T
import Data.Typeable
Expand All @@ -37,6 +36,11 @@ import GHC.TypeLits
import qualified Data.Aeson.Key as A
#endif

#if !MIN_VERSION_base(4,11,0)
import Data.Monoid ((<>))
#endif


camelToWithOverrides :: Char -> Map.Map String String -> Options
camelToWithOverrides c overrides = defaultOptions
{ fieldLabelModifier = modifier
Expand Down

0 comments on commit 24f1dd7

Please sign in to comment.