Skip to content

Add missing monotonicTime #187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### Next release: 0.10.1.0

* [#187](https://github.com/tweag/webauthn/pull/187) Implement monotonicTime in MonadTime to resolve build-time warning

### 0.10.0.0

* [#184](https://github.com/tweag/webauthn/pull/184) Pass a list of allowed origins instead of a single origin.
Expand Down
3 changes: 2 additions & 1 deletion src/Crypto/WebAuthn/Internal/DateOrphans.hs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
module Crypto.WebAuthn.Internal.DateOrphans () where

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

instance (Timeable t, Monad m) => MonadTime (ReaderT t m) where
currentTime = asks timeConvert
monotonicTime = asks (realToFrac . timeGetElapsedP)
2 changes: 1 addition & 1 deletion webauthn.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ library
jose >= 0.11 && < 0.12,
lens >= 4.18.1 && < 5.3,
memory >= 0.15.0 && < 0.19,
monad-time >= 0.3.1 && < 0.5,
monad-time >= 0.4.0 && < 0.5,
mtl >= 2.2.2 && < 2.4,
serialise >= 0.2.3 && < 0.3,
singletons >= 2.6 && < 3.2,
Expand Down
Loading