Skip to content
This repository was archived by the owner on May 9, 2023. It is now read-only.

Commit 55f8209

Browse files
authored
Merge pull request #9 from tiago-loureiro/master
Remove upper bounds and add stack support
2 parents 25274a7 + 10a0d7d commit 55f8209

File tree

5 files changed

+15
-14
lines changed

5 files changed

+15
-14
lines changed

main/Main.hs

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import qualified Crypto.Hash as CH
77
import Data.Byteable (toBytes)
88
import Data.ByteString (ByteString)
99
import Data.ByteString.Lazy (toStrict)
10+
import Data.Monoid ((<>))
1011
import Options.Applicative
1112

1213
import System.IO.Streams (InputStream, stdin, stdout,

multihash.cabal

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: multihash
2-
version: 0.1.1
2+
version: 0.1.3
33
synopsis: Multihash library and CLI executable
44
description: Multihash is a protocol for encoding the hash algorithm
55
and digest length at the start of the digest.
@@ -31,15 +31,15 @@ library
3131
hs-source-dirs: src
3232
default-language: Haskell2010
3333

34-
build-depends: attoparsec >= 0.12 && < 0.13
35-
, base >= 4.7 && < 4.9
34+
build-depends: attoparsec >= 0.12 && < 0.14
35+
, base >= 4.7 && < 4.10
3636
-- , base32-bytestring >= 0.2 && < 0.3
3737
, base58-bytestring >= 0.1 && < 0.2
3838
, base64-bytestring >= 1.0 && < 1.1
3939
, bytestring >= 0.10 && < 0.11
4040
, cryptohash >= 0.11 && < 0.12
4141
, hex >= 0.1 && < 0.2
42-
, io-streams >= 1.2 && < 1.3
42+
, io-streams >= 1.2 && < 1.4
4343

4444

4545
executable multihash
@@ -49,14 +49,14 @@ executable multihash
4949
ghc-options: -threaded -Wall -fwarn-tabs -funbox-strict-fields -O2 -fdicts-cheap
5050
-fno-warn-orphans -fno-warn-unused-do-bind -rtsopts
5151

52-
build-depends: base >= 4.7 && < 4.9
53-
-- , base32-bytestring >= 0.2 && < 0.3
52+
build-depends: base >= 4.7 && < 4.10
53+
-- , base32-bytestring >= 0.2
5454
, base64-bytestring >= 1.0 && < 1.1
5555
, base58-bytestring >= 0.1 && < 0.2
5656
, byteable >= 0.1 && < 0.2
5757
, bytestring >= 0.10 && < 0.11
5858
, cryptohash >= 0.11 && < 0.12
5959
, hex >= 0.1 && < 0.2
60-
, io-streams >= 1.2 && < 1.3
60+
, io-streams >= 1.2 && < 1.4
6161
, multihash >= 0.1 && < 0.2
62-
, optparse-applicative >= 0.11 && < 0.12
62+
, optparse-applicative >= 0.11 && < 0.14

src/Data/Multihash/Digest.hs

-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ import Data.ByteString.Builder (Builder, byteString,
1010
import qualified Data.ByteString.Builder as BB
1111
import qualified Data.ByteString.Lazy as BL
1212
import Data.Monoid ((<>))
13-
import Data.Word (Word8)
14-
1513

1614
data MultihashDigest =
1715
MultihashDigest

src/System/IO/Streams/Crypto.hs

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
module System.IO.Streams.Crypto where
22

3-
import Control.Exception (bracket)
43
import Crypto.Hash (Digest, HashAlgorithm (..))
54
import Data.ByteString (ByteString)
6-
import Data.Multihash.Digest (decoder)
7-
import System.IO.Streams (InputStream, fold, inputFoldM)
8-
5+
import System.IO.Streams (InputStream, fold)
96

107
hashInputStream :: (HashAlgorithm h) => InputStream ByteString -> IO (Digest h)
118
hashInputStream = fmap hashFinalize . fold update hashInit

stack.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
resolver: lts-8.15
2+
packages:
3+
- '.'
4+
extra-deps:
5+
- base58-bytestring-0.1.0

0 commit comments

Comments
 (0)