aboutsummaryrefslogtreecommitdiff
path: root/Backend
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-12-14 12:46:57 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-12-14 12:46:57 -0400
commit3a0bd261d9cfd395ed23ff43515523e6c6658c33 (patch)
tree9186c5daf386ba8e76c47ec869a737344a5a74d1 /Backend
parentac4b4a812da85b46e7d656b12d9ff5568ef706fd (diff)
fold Build/SysConfig.hs into BuildInfo via include
This avoids warnings from stack about the module not being listed in the cabal file. So, the generated file is also renamed to Build/SysConfig. Note that the setup program seems to be cached despite these changes; I had to cabal clean to get cabal to update it so that Build/SysConfig was written. This commit was sponsored by Jochen Bartl on Patreon.
Diffstat (limited to 'Backend')
-rw-r--r--Backend/Hash.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/Backend/Hash.hs b/Backend/Hash.hs
index a0a16b74d..da0f7df9b 100644
--- a/Backend/Hash.hs
+++ b/Backend/Hash.hs
@@ -18,7 +18,7 @@ import Types.KeySource
import Utility.Hash
import Utility.ExternalSHA
-import qualified Build.SysConfig as SysConfig
+import qualified BuildInfo
import qualified Data.ByteString.Lazy as L
import Data.Char
@@ -187,11 +187,11 @@ hashFile hash file filesize = go hash
shaHasher :: HashSize -> Integer -> Either (L.ByteString -> String) (String, L.ByteString -> String)
shaHasher (HashSize hashsize) filesize
- | hashsize == 1 = use SysConfig.sha1 sha1
- | hashsize == 256 = use SysConfig.sha256 sha2_256
- | hashsize == 224 = use SysConfig.sha224 sha2_224
- | hashsize == 384 = use SysConfig.sha384 sha2_384
- | hashsize == 512 = use SysConfig.sha512 sha2_512
+ | hashsize == 1 = use BuildInfo.sha1 sha1
+ | hashsize == 256 = use BuildInfo.sha256 sha2_256
+ | hashsize == 224 = use BuildInfo.sha224 sha2_224
+ | hashsize == 384 = use BuildInfo.sha384 sha2_384
+ | hashsize == 512 = use BuildInfo.sha512 sha2_512
| otherwise = error $ "unsupported SHA size " ++ show hashsize
where
use Nothing hasher = Left $ usehasher hasher