From 8372e801ef062223756db69818a7b60cfd9bb066 Mon Sep 17 00:00:00 2001 From: amesgen Date: Tue, 8 Aug 2023 23:36:45 +0200 Subject: [PATCH] Fix `RealFrac Seconds` instance --- System/Clock/Seconds.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/System/Clock/Seconds.hs b/System/Clock/Seconds.hs index a9a1c78..f7457cb 100644 --- a/System/Clock/Seconds.hs +++ b/System/Clock/Seconds.hs @@ -50,7 +50,7 @@ instance Fractional Seconds where instance RealFrac Seconds where properFraction (Seconds (TimeSpec s ns)) - | s >= 0 = (fromIntegral s, Seconds $ TimeSpec 0 ns) + | s >= 0 || ns == 0 = (fromIntegral s, Seconds $ TimeSpec 0 ns) | otherwise = (fromIntegral (s+1), Seconds $ TimeSpec (-1) ns) -- | The 'getTime' function shall return the current value for the -scripts Wojtek's customized Guix
aboutsummaryrefslogtreecommitdiff
path: root/tests/challenge.scm
AgeCommit message (Expand)Author
2020-05-22packages: Introduce <content-hash> and use it in <origin>....* guix/packages.scm (<content-hash>): New record type. (define-content-hash-constructor, build-content-hash) (content-hash): New macros. (print-content-hash): New procedure. (<origin>): Rename constructor to '%origin'. [sha256]: Remove field. [hash]: New field. Adjust users. (origin-compatibility-helper, origin): New macros. (origin-sha256): New deprecated procedure. (origin->derivation): Adjust accordingly. * tests/packages.scm ("package-source-derivation, origin, sha512"): New test. * guix/tests.scm: Hide (gcrypt hash) 'sha256' for proper syntax matching. * tests/challenge.scm: Add #:prefix for (gcrypt hash) and adjust users. * tests/derivations.scm: Likewise. * tests/store.scm: Likewise. * tests/graph.scm ("bag DAG, including origins"): Provide 'sha256' field with the right length. * gnu/packages/aspell.scm (aspell-dictionary) (aspell-dict-ca, aspell-dict-it): Use 'hash' and 'content-hash' for proper syntax matching. * gnu/packages/bash.scm (bash-patch): Rename 'sha256' to 'sha256-bv'. * gnu/packages/bootstrap.scm (bootstrap-executable): Rename 'sha256' to 'bv'. * gnu/packages/readline.scm (readline-patch): Likewise. * gnu/packages/virtualization.scm (qemu-patch): Rename 'sha256' to 'sha256-bv'. * guix/import/utils.scm: Hide (gcrypt hash) 'sha256'. Ludovic Courtès