Commit aa06a107 authored by Yuanle Song's avatar Yuanle Song
Browse files

moved RD.Lib to Lib

parent 35698472
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ import Network.HTTP.Client (path, responseStatus)
import Formatting hiding (bytes)
import Control.Retry (retrying, constantDelay, limitRetries, rsIterNumber)

import RD.Lib (sha1sumOnBytes, guessFilename)
import Lib (sha1sumOnBytes, guessFilename)
import Type
import Opts

+3 −4
Original line number Diff line number Diff line
@@ -23,14 +23,14 @@ default-extensions:

dependencies:
  - base >= 4.7 && < 5
  - scotty
  - wai
  - warp
  # - wai-app-static
  - wai-middleware-static
  - hedis
  - directory
  - scotty
  - cryptohash
  - hedis
  - bytestring
  - text
  - byteable
@@ -41,7 +41,7 @@ dependencies:
  - filepath
  - unix
  - unordered-containers
  - split
  - optparse-applicative

library:
  source-dirs: src
@@ -59,7 +59,6 @@ executables:
    main:             Main.hs
    dependencies:
    - reliable-download    # I only need the Type module
    - optparse-applicative
    - http-conduit
    - http-client
    - http-types
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ import qualified Data.HashMap.Strict as M

import Type
import Config
import RD.Lib (sha1sum, genBlocks)
import Lib (sha1sum, genBlocks)

-- | fill block sha1sum, if sha1sum is not ready yet, put "pending" there.
fillSha1sum :: RDRuntimeConfig -> FillBlockParam -> IO [BlockWithChecksum]
+1 −1
Original line number Diff line number Diff line
module RD.Lib
module Lib
    ( sha1sum
    , sha1sumOnBytes
    , guessFilename
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ import qualified Database.Redis as R

import Type
import Config
import RD.Lib (sha1sumOnBytes)
import Lib (sha1sumOnBytes)

-- | read file range data as LB.ByteString. handle must be a handle to an
-- opened file.
Loading