Skip to content

A peer-to-peer stack for code collaboration

Upgrade deps for hackage release (#679)

Julian Arni6ccede606c1b
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 99ce060..9dd1cb3 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -53,6 +53,7 @@ jobs:
- run:
name: Homebrew Dependencies
command: |
+ brew update
brew bundle
echo 'export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"' >> $BASH_ENV
diff --git a/package.yaml b/package.yaml
index 79d1a4d..c70e17f 100644
--- a/package.yaml
+++ b/package.yaml
@@ -105,7 +105,7 @@ tests:
- time
build-tools:
- tasty-discover
- ghc-options: -threaded -rtsopts -with-rtsopts=-N
+ ghc-options: [-threaded, -rtsopts, -with-rtsopts=-N]
doctest:
main: Main.hs
source-dirs:
@@ -114,7 +114,7 @@ tests:
- doctest
- Glob
- hpack
- ghc-options: -threaded -rtsopts -with-rtsopts=-N
+ ghc-options: [-threaded, -rtsopts, -with-rtsopts=-N]
e2e:
main: Main.hs
source-dirs:
@@ -145,7 +145,7 @@ executables:
- filepath
- text
- unix
- ghc-options: -main-is Rad -O3 -threaded
+ ghc-options: ["-main-is", "Rad", "-O3", "-threaded"]
radicle:
main: RadicleExe.hs
@@ -156,7 +156,7 @@ executables:
- bytestring
- directory
- optparse-applicative
- ghc-options: -main-is RadicleExe
+ ghc-options: ["-main-is", "RadicleExe"]
rad-daemon-radicle:
main: Daemon.hs
@@ -173,7 +173,7 @@ executables:
- unliftio
- wai-cors
- warp
- ghc-options: -main-is Daemon
+ ghc-options: ["-main-is", "Daemon"]
rad-repl:
main: RadicleRepl.hs
@@ -182,7 +182,7 @@ executables:
dependencies:
- radicle
- optparse-applicative
- ghc-options: -main-is RadicleRepl
+ ghc-options: ["-main-is", "RadicleRepl"]
radicle-doc:
main: Doc.hs
@@ -193,7 +193,7 @@ executables:
- optparse-applicative
- pandoc
- text
- ghc-options: -main-is Doc
+ ghc-options: ["-main-is", "Doc"]
radicle-ref-doc:
main: ReferenceDoc.hs
@@ -206,7 +206,7 @@ executables:
- containers
- text
- yaml
- ghc-options: -main-is ReferenceDoc
+ ghc-options: ["-main-is", "ReferenceDoc"]
radicle-github-issues:
main: GithubIssues.hs
@@ -218,7 +218,7 @@ executables:
- time
- github < 0.21
- optparse-applicative
- ghc-options: -main-is GithubIssues
+ ghc-options: ["-main-is", "GithubIssues"]
radicle-benchmark:
main: Benchmarks.hs
@@ -227,7 +227,7 @@ executables:
dependencies:
- radicle
- criterion
- ghc-options: -main-is Benchmarks
+ ghc-options: ["-main-is", "Benchmarks"]
rad-machines:
main: Machines.hs
@@ -237,7 +237,7 @@ executables:
- radicle
- optparse-applicative
- safe-exceptions
- ghc-options: -main-is Machines
+ ghc-options: ["-main-is", "Machines"]
default-extensions:
- AutoDeriveTypeable
diff --git a/snapshot.yaml b/snapshot.yaml
index 48ae338..2204d18 100644
--- a/snapshot.yaml
+++ b/snapshot.yaml
@@ -15,15 +15,13 @@ packages:
- github-0.20
- sandi-0.4.3@sha256:2ada9c759424f243095ab28b55687cdec4e9d16bac3589f9d200280207c50216
- serialise-0.2.1.0
-- git: https://github.com/oscoin/ipfs.git
- commit: 057ba4a4bf9bb846a08b1208b0ed45af33a38082
- subdirs:
- - ipfs-api
- - ipld-cid
- - binary-varint
- - git-remote-ipfs
- - multibase
- - multihash-cryptonite
+- ipfs-api-0.1.0.0
+- ipld-cid-0.1.0.0
+- binary-varint-0.1.0.0
+- git-remote-ipfs-0.1.0.0
+- multibase-0.1.0.0
+- multihash-cryptonite-0.1.0.0
+- base32-z-bytestring-1.0.0.0
flags:
sandi:
diff --git a/src/Radicle/Ipfs.hs b/src/Radicle/Ipfs.hs
index 5ed21d2..70aea34 100644
--- a/src/Radicle/Ipfs.hs
+++ b/src/Radicle/Ipfs.hs
@@ -59,7 +59,7 @@ import Control.Retry
import Data.Aeson (FromJSON, ToJSON, (.:), (.=))
import qualified Data.Aeson as Aeson
import qualified Data.Aeson.Types as Aeson
-import qualified Data.ByteString.Multibase as Multibase
+import qualified Data.ByteString.BaseN as Multibase
import Data.Conduit ((.|))
import qualified Data.Conduit as C
import qualified Data.Conduit.Attoparsec as C
@@ -224,9 +224,9 @@ data PubsubMessage = PubsubMessage
instance FromJSON PubsubMessage where
parseJSON = Aeson.withObject "PubsubMessage" $ \o -> do
messageTopicIDs <- o .: "topicIDs"
- Right messageData <- o .: "data" <&> T.encodeUtf8 <&> Multibase.decodeBase64
- Right messageFrom <- o .: "from" <&> T.encodeUtf8 <&> Multibase.decodeBase64
- Right messageSeqno <- o .: "seqno" <&> T.encodeUtf8 <&> Multibase.decodeBase64
+ Just messageData <- o .: "data" <&> T.encodeUtf8 <&> Multibase.decodeBase64
+ Just messageFrom <- o .: "from" <&> T.encodeUtf8 <&> Multibase.decodeBase64
+ Just messageSeqno <- o .: "seqno" <&> T.encodeUtf8 <&> Multibase.decodeBase64
pure PubsubMessage {..}
-- | Subscribe to a topic and call @messageHandler@ on every message.