diff --git a/app/Foliage/HackageSecurity.hs b/app/Foliage/HackageSecurity.hs index b51f610..eb99247 100644 --- a/app/Foliage/HackageSecurity.hs +++ b/app/Foliage/HackageSecurity.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE ImportQualifiedPost #-} @@ -14,6 +15,7 @@ where import Control.Monad (replicateM) import Crypto.Sign.Ed25519 (unPublicKey) +import Data.Base16.Types (extractBase16) import Data.ByteString.Base16 (encodeBase16) import Data.ByteString.Char8 qualified as BS import Data.ByteString.Lazy qualified as BSL @@ -58,7 +60,7 @@ createKeys base = do putStrLn $ " " ++ showKey key showKey :: Some Key -> [Char] -showKey k = T.unpack $ encodeBase16 $ exportSomePublicKey $ somePublicKey k +showKey k = T.unpack $ extractBase16 $ encodeBase16 $ exportSomePublicKey $ somePublicKey k writeKeyWithId :: FilePath -> Some Key -> IO () writeKeyWithId base k = diff --git a/app/Foliage/Meta/Aeson.hs b/app/Foliage/Meta/Aeson.hs index bae3cc7..cd74bd1 100644 --- a/app/Foliage/Meta/Aeson.hs +++ b/app/Foliage/Meta/Aeson.hs @@ -10,7 +10,6 @@ import Data.Text import Distribution.Types.Orphans () import Foliage.Meta import Foliage.Utils.Aeson -import Network.URI (URI) deriving via MyAesonEncoding RevisionSpec instance ToJSON RevisionSpec @@ -29,7 +28,3 @@ instance ToJSON PackageVersionSource where { sumEncoding = ObjectWithSingleField , omitNothingFields = True } - -instance ToJSON URI where - toJSON :: URI -> Value - toJSON = toJSON . show diff --git a/app/Foliage/PrepareSdist.hs b/app/Foliage/PrepareSdist.hs index 7d9108d..62bfb25 100644 --- a/app/Foliage/PrepareSdist.hs +++ b/app/Foliage/PrepareSdist.hs @@ -10,6 +10,7 @@ where import Control.Monad (when) import Crypto.Hash.SHA256 qualified as SHA256 +import Data.Base16.Types (extractBase16) import Data.Binary qualified as Binary import Data.ByteString qualified as BS import Data.ByteString.Base16 @@ -110,4 +111,4 @@ readFileHashValue :: FilePath -> IO BS.ByteString readFileHashValue = fmap SHA256.hash . BS.readFile showHashValue :: BS.ByteString -> [Char] -showHashValue = T.unpack . encodeBase16 +showHashValue = T.unpack . extractBase16 . encodeBase16 diff --git a/foliage.cabal b/foliage.cabal index d817eea..4c1ff7e 100644 --- a/foliage.cabal +++ b/foliage.cabal @@ -43,14 +43,14 @@ executable foliage Network.URI.Orphans build-depends: - base >=4.14.3.0 && <4.18, - aeson >=2.0.3.0 && <2.2, - base16 >=0.3.2.0 && <0.4, + base >=4.14.3.0 && <4.20, + aeson >=2.2 && <2.3, + base16 >=0.3.2.0 && <1.1, binary >=0.8.9.0 && <0.9, - bytestring >=0.10.12.0 && <0.12, - Cabal >=3.10 && <3.11, - Cabal-syntax >=3.10 && <3.11, - cabal-install >=3.10 && <3.11, + bytestring >=0.10.12.0 && <0.13, + Cabal >=3.10 && <3.12, + Cabal-syntax >=3.10 && <3.12, + cabal-install >=3.10 && <3.12, containers >=0.6.5.1 && <0.7, cryptohash-sha256 >=0.11.102.1 && <0.12, directory >=1.3.6.0 && <1.4, @@ -62,7 +62,7 @@ executable foliage shake >=0.19.6 && <0.20, stache >=2.3.3 && <2.4, tar >=0.5.1.1 && <0.6, - text >=1.2.4.1 && <2.1, + text >=1.2.4.1 && <2.2, time >=1.9.3 && <1.13, time-compat >=1.9.6.1 && <1.10, tomland >=1.3.3.1 && <1.4,