Skip to content

Commit 2e00f04

Browse files
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
1 parent 04cd67d commit 2e00f04

File tree

4 files changed

+13
-15
lines changed

4 files changed

+13
-15
lines changed

app/Foliage/HackageSecurity.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE FlexibleContexts #-}
23
{-# LANGUAGE GADTs #-}
34
{-# LANGUAGE ImportQualifiedPost #-}
@@ -14,6 +15,7 @@ where
1415

1516
import Control.Monad (replicateM)
1617
import Crypto.Sign.Ed25519 (unPublicKey)
18+
import Data.Base16.Types (extractBase16)
1719
import Data.ByteString.Base16 (encodeBase16)
1820
import Data.ByteString.Char8 qualified as BS
1921
import Data.ByteString.Lazy qualified as BSL
@@ -58,7 +60,7 @@ createKeys base = do
5860
putStrLn $ " " ++ showKey key
5961

6062
showKey :: Some Key -> [Char]
61-
showKey k = T.unpack $ encodeBase16 $ exportSomePublicKey $ somePublicKey k
63+
showKey k = T.unpack $ extractBase16 $ encodeBase16 $ exportSomePublicKey $ somePublicKey k
6264

6365
writeKeyWithId :: FilePath -> Some Key -> IO ()
6466
writeKeyWithId base k =

app/Foliage/Meta/Aeson.hs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import Data.Text
1010
import Distribution.Types.Orphans ()
1111
import Foliage.Meta
1212
import Foliage.Utils.Aeson
13-
import Network.URI (URI)
1413

1514
deriving via MyAesonEncoding RevisionSpec instance ToJSON RevisionSpec
1615

@@ -29,7 +28,3 @@ instance ToJSON PackageVersionSource where
2928
{ sumEncoding = ObjectWithSingleField
3029
, omitNothingFields = True
3130
}
32-
33-
instance ToJSON URI where
34-
toJSON :: URI -> Value
35-
toJSON = toJSON . show

app/Foliage/PrepareSdist.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ where
1010

1111
import Control.Monad (when)
1212
import Crypto.Hash.SHA256 qualified as SHA256
13+
import Data.Base16.Types (extractBase16)
1314
import Data.Binary qualified as Binary
1415
import Data.ByteString qualified as BS
1516
import Data.ByteString.Base16
@@ -110,4 +111,4 @@ readFileHashValue :: FilePath -> IO BS.ByteString
110111
readFileHashValue = fmap SHA256.hash . BS.readFile
111112

112113
showHashValue :: BS.ByteString -> [Char]
113-
showHashValue = T.unpack . encodeBase16
114+
showHashValue = T.unpack . extractBase16 . encodeBase16

foliage.cabal

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ executable foliage
4343
Network.URI.Orphans
4444

4545
build-depends:
46-
base >=4.14.3.0 && <4.18,
47-
aeson >=2.0.3.0 && <2.2,
48-
base16 >=0.3.2.0 && <0.4,
46+
base >=4.14.3.0 && <4.20,
47+
aeson >=2.2 && <2.3,
48+
base16 >=0.3.2.0 && <1.1,
4949
binary >=0.8.9.0 && <0.9,
50-
bytestring >=0.10.12.0 && <0.12,
51-
Cabal >=3.10 && <3.11,
52-
Cabal-syntax >=3.10 && <3.11,
53-
cabal-install >=3.10 && <3.11,
50+
bytestring >=0.10.12.0 && <0.13,
51+
Cabal >=3.10 && <3.12,
52+
Cabal-syntax >=3.10 && <3.12,
53+
cabal-install >=3.10 && <3.12,
5454
containers >=0.6.5.1 && <0.7,
5555
cryptohash-sha256 >=0.11.102.1 && <0.12,
5656
directory >=1.3.6.0 && <1.4,
@@ -62,7 +62,7 @@ executable foliage
6262
shake >=0.19.6 && <0.20,
6363
stache >=2.3.3 && <2.4,
6464
tar >=0.5.1.1 && <0.6,
65-
text >=1.2.4.1 && <2.1,
65+
text >=1.2.4.1 && <2.2,
6666
time >=1.9.3 && <1.13,
6767
time-compat >=1.9.6.1 && <1.10,
6868
tomland >=1.3.3.1 && <1.4,

0 commit comments

Comments
 (0)