git.iko.soy/typeable/entropy
on main help sign in
Update for cabal 3.6, ghc 9.2.1
commit4550cb08b26f0dc03400a52b43228481b80060b0 authorThomas M. DuBuisson <tommd@muse.dev> dateTue 2 Nov 2021, 07:52 (5 years ago) parentec6ddb6
2 files changed+5−5
Setup.hs+4−4 entropy.cabal+1−1
Setup.hs+4−4
@@ -26,7 +26,7 @@ main = defaultMainWithHooks hk
2626
2727compileCheck :: FilePath -> String -> String -> String -> IO Bool
2828compileCheck cc testName message sourceCode = do
29− withTempDirectory normal "" testName $ \tmpDir -> do
29+ withTempDirectory normal "" testName $ \tmpDir -> do
3030 writeFile (tmpDir ++ "/" ++ testName ++ ".c") sourceCode
3131 ec <- myRawSystemExitCode normal cc [tmpDir </> testName ++ ".c", "-o", tmpDir ++ "/a","-no-hs-main"]
3232 notice normal $ message ++ show (ec == ExitSuccess)
@@ -54,7 +54,7 @@ checkRDRAND cc lbi = do
5454
5555checkGetrandom :: FilePath -> LocalBuildInfo -> IO LocalBuildInfo
5656checkGetrandom cc lbi = do
57− libcGetrandom <- compileCheck cc "testLibcGetrandom" "Result of libc getrandom() Test: "
57+ libcGetrandom <- compileCheck cc "testLibcGetrandom" "Result of libc getrandom() Test: "
5858 (unlines [ "#define _GNU_SOURCE"
5959 , "#include <errno.h>"
6060 , "#include <sys/random.h>"
@@ -65,8 +65,8 @@ checkGetrandom cc lbi = do
6565 , " return getrandom(&tmp, sizeof(tmp), GRND_NONBLOCK) != -1;"
6666 , "}"
6767 ])
68− if libcGetrandom then return $ addOptions cArgsLibc cArgsLibc lbi
69− else do
68+ if libcGetrandom then return $ addOptions cArgsLibc cArgsLibc lbi
69+ else do
7070 syscallGetrandom <- compileCheck cc "testSyscallGetrandom" "Result of syscall getrandom() Test: "
7171 (unlines [ "#define _GNU_SOURCE"
7272 , "#include <errno.h>"
entropy.cabal+1−1
@@ -34,7 +34,7 @@ flag halvm
3434
3535
3636custom-setup
37− setup-depends: Cabal >= 1.10 && < 3.5
37+ setup-depends: Cabal >= 1.10 && < 3.7
3838 , base < 5
3939 , filepath < 1.5
4040 , directory < 1.4