diff options
author | Andrew Cady <d@jerkface.net> | 2023-06-19 11:04:10 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2023-06-19 11:04:10 -0400 |
commit | 9c1bd9b72a3167dd988bba9a51d381394ef3cd05 (patch) | |
tree | 49c2a011e57956edd91fc7443e04e40bf73b5117 | |
parent | dcd1b899cef238c77c9a3169017dfaa5e7b7f4e3 (diff) |
forward port to stackage lts-20.25
-rw-r--r-- | fsmgr.cabal | 2 | ||||
-rw-r--r-- | src/Crypto/Hash/Types/Digest/Read.hs | 20 | ||||
-rw-r--r-- | stack.yaml | 4 |
3 files changed, 3 insertions, 23 deletions
diff --git a/fsmgr.cabal b/fsmgr.cabal index 4d2de80..6ad9040 100644 --- a/fsmgr.cabal +++ b/fsmgr.cabal | |||
@@ -19,7 +19,7 @@ source-repository head | |||
19 | 19 | ||
20 | library | 20 | library |
21 | exposed-modules: | 21 | exposed-modules: |
22 | Crypto.Hash.Types.Digest.Read, ConfigFile, String | 22 | ConfigFile, String |
23 | other-modules: | 23 | other-modules: |
24 | Paths_fsmgr | 24 | Paths_fsmgr |
25 | hs-source-dirs: | 25 | hs-source-dirs: |
diff --git a/src/Crypto/Hash/Types/Digest/Read.hs b/src/Crypto/Hash/Types/Digest/Read.hs deleted file mode 100644 index f371f30..0000000 --- a/src/Crypto/Hash/Types/Digest/Read.hs +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | {-# OPTIONS_GHC -fno-warn-orphans #-} | ||
2 | {-# LANGUAGE InstanceSigs #-} | ||
3 | {-# LANGUAGE NoImplicitPrelude #-} | ||
4 | {-# LANGUAGE PartialTypeSignatures #-} | ||
5 | {-# LANGUAGE ViewPatterns #-} | ||
6 | module Crypto.Hash.Types.Digest.Read where | ||
7 | import Rebase.Prelude hiding (hash) | ||
8 | |||
9 | import Crypto.Hash | ||
10 | import Data.ByteArray.Encoding | ||
11 | import qualified Rebase.Data.Text as Text | ||
12 | |||
13 | instance HashAlgorithm a => | ||
14 | Read (Digest a) where | ||
15 | readsPrec :: Int -> (String -> [(Digest a, String)]) | ||
16 | readsPrec _ (Text.encodeUtf8 . Text.pack -> bytes) = | ||
17 | toList $ (flip (,) "") <$> (digestFromByteString =<< baseConv bytes) | ||
18 | where | ||
19 | baseConv :: ByteString -> Maybe (ByteString) | ||
20 | baseConv = listToMaybe . toList . convertFromBase Base16 | ||
@@ -1,8 +1,8 @@ | |||
1 | resolver: lts-13.26 | 1 | resolver: lts-20.25 |
2 | # build: | 2 | # build: |
3 | # library-profiling: true | 3 | # library-profiling: true |
4 | # executable-profiling: true | 4 | # executable-profiling: true |
5 | packages: | 5 | packages: |
6 | - . | 6 | - . |
7 | extra-deps: | 7 | extra-deps: |
8 | - yaml-combinators-1.1.1.1 | 8 | - yaml-combinators-1.1.2.1 |