From 5d83d0eada167b8ce334c7d4db376a3f211b668e Mon Sep 17 00:00:00 2001
From: Shae Erisson <shae@scannedinavian.com>
Date: Wed, 28 Jun 2023 16:31:47 -0500
Subject: [PATCH] fetch all the shares at the same time

---
 gbs-downloader.cabal  | 2 ++
 src/Tahoe/Download.hs | 1 +
 2 files changed, 3 insertions(+)

diff --git a/gbs-downloader.cabal b/gbs-downloader.cabal
index 23a9f79..558340f 100644
--- a/gbs-downloader.cabal
+++ b/gbs-downloader.cabal
@@ -95,6 +95,7 @@ library
   -- Other library packages from which modules are imported.
   build-depends:
     , aeson
+    , async
     , base
     , base32
     , base64-bytestring
@@ -206,6 +207,7 @@ test-suite gbs-downloader-test
 
   -- Base language which the package is written in.
   default-language: Haskell2010
+  ghc-options:      -threaded
 
   -- Modules included in this executable, other than Main.
   other-modules:    Generators
diff --git a/src/Tahoe/Download.hs b/src/Tahoe/Download.hs
index 795ebd4..924905e 100644
--- a/src/Tahoe/Download.hs
+++ b/src/Tahoe/Download.hs
@@ -17,6 +17,7 @@ module Tahoe.Download (
     getShareNumbers,
 ) where
 
+import Control.Concurrent.Async (mapConcurrently)
 import Control.Exception (Exception (displayException), SomeException, try)
 import Control.Monad.IO.Class (MonadIO (liftIO))
 import Data.Bifunctor (Bifunctor (first, second))
-- 
GitLab