Skip to content

Commit ca1a0af

Browse files
author
Erin van der Veen
authored
Merge pull request #187 from tweag/sv/monotonicTime
Add missing monotonicTime
2 parents cce1152 + 008ae17 commit ca1a0af

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

Diff for: changelog.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### Next release: 0.10.1.0
2+
3+
* [#187](https://github.com/tweag/webauthn/pull/187) Implement monotonicTime in MonadTime to resolve build-time warning
4+
15
### 0.10.0.0
26

37
* [#184](https://github.com/tweag/webauthn/pull/184) Pass a list of allowed origins instead of a single origin.

Diff for: src/Crypto/WebAuthn/Internal/DateOrphans.hs

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
module Crypto.WebAuthn.Internal.DateOrphans () where
2222

2323
import Control.Monad.Reader (ReaderT, asks)
24-
import Control.Monad.Time (MonadTime, currentTime)
24+
import Control.Monad.Time (MonadTime, currentTime, monotonicTime)
2525
import Data.Fixed (Fixed (MkFixed), HasResolution, Nano)
2626
import Data.Hourglass (Elapsed (Elapsed), ElapsedP (ElapsedP), NanoSeconds (NanoSeconds), Seconds (Seconds), Time, Timeable, timeConvert, timeFromElapsedP, timeGetElapsedP)
2727
import Data.Time (UTCTime, nominalDiffTimeToSeconds, secondsToNominalDiffTime)
@@ -45,3 +45,4 @@ instance (HasResolution a) => Timeable (Fixed a) where
4545

4646
instance (Timeable t, Monad m) => MonadTime (ReaderT t m) where
4747
currentTime = asks timeConvert
48+
monotonicTime = asks (realToFrac . timeGetElapsedP)

Diff for: webauthn.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ library
9090
jose >= 0.11 && < 0.12,
9191
lens >= 4.18.1 && < 5.3,
9292
memory >= 0.15.0 && < 0.19,
93-
monad-time >= 0.3.1 && < 0.5,
93+
monad-time >= 0.4.0 && < 0.5,
9494
mtl >= 2.2.2 && < 2.4,
9595
serialise >= 0.2.3 && < 0.3,
9696
singletons >= 2.6 && < 3.2,

0 commit comments

Comments
 (0)