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.
This commit is contained in:
parent
ad6683e722
commit
308cd1383c
24 changed files with 64 additions and 63 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue