mirror of
https://github.com/input-output-hk/foliage.git
synced 2024-11-22 02:53:41 +03:00
Bump to base16 1.0, aeson 2.2, compatibiliity with GHC9.8 (#87)
* compatibility with base16 > 1 and ghc 9.8 * bump to aeson-2.2
This commit is contained in:
parent
04cd67dff3
commit
2e00f04ec5
@ -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 =
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user