File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -119,8 +119,7 @@ module Functora.Prelude
119
119
dropAround ,
120
120
dropWhileEnd ,
121
121
AscOrDesc (.. ),
122
- Nonce ,
123
- unNonce ,
122
+ Nonce (.. ),
124
123
NonceGen ,
125
124
newNonceGen ,
126
125
withNonce ,
@@ -1168,12 +1167,14 @@ data AscOrDesc
1168
1167
)
1169
1168
1170
1169
newtype Nonce = Nonce
1171
- { unNonce :: Natural
1170
+ { unNonce :: Integer
1172
1171
}
1173
1172
deriving newtype
1174
1173
( Eq ,
1175
1174
Ord ,
1176
- Show
1175
+ Show ,
1176
+ Read ,
1177
+ Binary
1177
1178
)
1178
1179
deriving stock
1179
1180
( Data ,
@@ -1184,6 +1185,7 @@ mkNonce :: (MonadIO m) => m Nonce
1184
1185
mkNonce =
1185
1186
liftIO
1186
1187
$ Nonce
1188
+ . from @ Natural @ Integer
1187
1189
. utcTimeToMicros
1188
1190
<$> getCurrentTime
1189
1191
Original file line number Diff line number Diff line change @@ -120,3 +120,7 @@ deriving newtype instance PersistFieldSql Fix
120
120
deriving newtype instance PersistField FixNonNeg
121
121
122
122
deriving newtype instance PersistFieldSql FixNonNeg
123
+
124
+ deriving newtype instance PersistField Nonce
125
+
126
+ deriving newtype instance PersistFieldSql Nonce
You can’t perform that action at this time.
0 commit comments