@@ -272,6 +272,7 @@ import Database.LSMTree.Internal.Unsafe (BlobRefInvalidError (..),
272
272
TableTrace , TableUnionNotCompatibleError (.. ),
273
273
UnionCredits (.. ), UnionDebt (.. ))
274
274
import qualified Database.LSMTree.Internal.Unsafe as Internal
275
+ import GHC.Stack (HasCallStack )
275
276
import Prelude hiding (lookup , take , takeWhile )
276
277
import System.FS.API (FsPath , HasFS (.. ), MountPoint (.. ), mkFsPath )
277
278
import System.FS.BlockIO.API (HasBlockIO (.. ), defaultIOCtxParams )
@@ -1251,14 +1252,14 @@ prop> inserts table entries = traverse_ (uncurry $ insert table) entries
1251
1252
-}
1252
1253
{-# SPECIALISE
1253
1254
inserts ::
1254
- (SerialiseKey k, SerialiseValue v, ResolveValue v, SerialiseValue b) =>
1255
+ (HasCallStack, SerialiseKey k, SerialiseValue v, ResolveValue v, SerialiseValue b) =>
1255
1256
Table IO k v b ->
1256
1257
Vector (k, v, Maybe b) ->
1257
1258
IO ()
1258
1259
#-}
1259
1260
inserts ::
1260
1261
forall m k v b .
1261
- (IOLike m ) =>
1262
+ (IOLike m , HasCallStack ) =>
1262
1263
(SerialiseKey k , SerialiseValue v , ResolveValue v , SerialiseValue b ) =>
1263
1264
Table m k v b ->
1264
1265
Vector (k , v , Maybe b ) ->
@@ -1351,14 +1352,14 @@ prop> upserts table entries = traverse_ (uncurry $ upsert table) entries
1351
1352
-}
1352
1353
{-# SPECIALISE
1353
1354
upserts ::
1354
- (SerialiseKey k, SerialiseValue v, ResolveValue v, SerialiseValue b) =>
1355
+ (HasCallStack, SerialiseKey k, SerialiseValue v, ResolveValue v, SerialiseValue b) =>
1355
1356
Table IO k v b ->
1356
1357
Vector (k, v) ->
1357
1358
IO ()
1358
1359
#-}
1359
1360
upserts ::
1360
1361
forall m k v b .
1361
- (IOLike m ) =>
1362
+ (HasCallStack , IOLike m ) =>
1362
1363
(SerialiseKey k , SerialiseValue v , ResolveValue v , SerialiseValue b ) =>
1363
1364
Table m k v b ->
1364
1365
Vector (k , v ) ->
@@ -1436,14 +1437,14 @@ prop> deletes table keys = traverse_ (delete table) keys
1436
1437
-}
1437
1438
{-# SPECIALISE
1438
1439
deletes ::
1439
- (SerialiseKey k, SerialiseValue v, ResolveValue v, SerialiseValue b) =>
1440
+ (HasCallStack, SerialiseKey k, SerialiseValue v, ResolveValue v, SerialiseValue b) =>
1440
1441
Table IO k v b ->
1441
1442
Vector k ->
1442
1443
IO ()
1443
1444
#-}
1444
1445
deletes ::
1445
1446
forall m k v b .
1446
- (IOLike m ) =>
1447
+ (HasCallStack , IOLike m ) =>
1447
1448
(SerialiseKey k , SerialiseValue v , ResolveValue v , SerialiseValue b ) =>
1448
1449
Table m k v b ->
1449
1450
Vector k ->
@@ -1525,14 +1526,14 @@ prop> updates table entries = traverse_ (uncurry $ update table) entries
1525
1526
-}
1526
1527
{-# SPECIALISE
1527
1528
updates ::
1528
- (SerialiseKey k, SerialiseValue v, ResolveValue v, SerialiseValue b) =>
1529
+ (HasCallStack, SerialiseKey k, SerialiseValue v, ResolveValue v, SerialiseValue b) =>
1529
1530
Table IO k v b ->
1530
1531
Vector (k, Update v b) ->
1531
1532
IO ()
1532
1533
#-}
1533
1534
updates ::
1534
1535
forall m k v b .
1535
- (IOLike m ) =>
1536
+ (IOLike m , HasCallStack ) =>
1536
1537
(SerialiseKey k , SerialiseValue v , ResolveValue v , SerialiseValue b ) =>
1537
1538
Table m k v b ->
1538
1539
Vector (k , Update v b ) ->
@@ -2206,14 +2207,14 @@ Throws the following exceptions:
2206
2207
-}
2207
2208
{-# SPECIALISE
2208
2209
withCursor ::
2209
- (ResolveValue v) =>
2210
+ (HasCallStack, ResolveValue v) =>
2210
2211
Table IO k v b ->
2211
2212
(Cursor IO k v b -> IO a) ->
2212
2213
IO a
2213
2214
#-}
2214
2215
withCursor ::
2215
2216
forall m k v b a .
2216
- (IOLike m ) =>
2217
+ (HasCallStack , IOLike m ) =>
2217
2218
(ResolveValue v ) =>
2218
2219
Table m k v b ->
2219
2220
(Cursor m k v b -> m a ) ->
@@ -2236,15 +2237,15 @@ Entry (Key 1) (Value "World")
2236
2237
-}
2237
2238
{-# SPECIALISE
2238
2239
withCursorAtOffset ::
2239
- (SerialiseKey k, ResolveValue v) =>
2240
+ (HasCallStack, SerialiseKey k, ResolveValue v) =>
2240
2241
Table IO k v b ->
2241
2242
k ->
2242
2243
(Cursor IO k v b -> IO a) ->
2243
2244
IO a
2244
2245
#-}
2245
2246
withCursorAtOffset ::
2246
2247
forall m k v b a .
2247
- (IOLike m ) =>
2248
+ (HasCallStack , IOLike m ) =>
2248
2249
(SerialiseKey k , ResolveValue v ) =>
2249
2250
Table m k v b ->
2250
2251
k ->
@@ -2283,13 +2284,13 @@ Throws the following exceptions:
2283
2284
-}
2284
2285
{-# SPECIALISE
2285
2286
newCursor ::
2286
- (ResolveValue v) =>
2287
+ (HasCallStack, ResolveValue v) =>
2287
2288
Table IO k v b ->
2288
2289
IO (Cursor IO k v b)
2289
2290
#-}
2290
2291
newCursor ::
2291
2292
forall m k v b .
2292
- (IOLike m ) =>
2293
+ (HasCallStack , IOLike m ) =>
2293
2294
(ResolveValue v ) =>
2294
2295
Table m k v b ->
2295
2296
m (Cursor m k v b )
@@ -2311,14 +2312,14 @@ Entry (Key 1) (Value "World")
2311
2312
-}
2312
2313
{-# SPECIALISE
2313
2314
newCursorAtOffset ::
2314
- (SerialiseKey k, ResolveValue v) =>
2315
+ (HasCallStack, SerialiseKey k, ResolveValue v) =>
2315
2316
Table IO k v b ->
2316
2317
k ->
2317
2318
IO (Cursor IO k v b)
2318
2319
#-}
2319
2320
newCursorAtOffset ::
2320
2321
forall m k v b .
2321
- (IOLike m ) =>
2322
+ (HasCallStack , IOLike m ) =>
2322
2323
(SerialiseKey k , ResolveValue v ) =>
2323
2324
Table m k v b ->
2324
2325
k ->
@@ -2339,12 +2340,13 @@ All other operations on a closed cursor will throw an exception.
2339
2340
-}
2340
2341
{-# SPECIALISE
2341
2342
closeCursor ::
2343
+ HasCallStack =>
2342
2344
Cursor IO k v b ->
2343
2345
IO ()
2344
2346
#-}
2345
2347
closeCursor ::
2346
2348
forall m k v b .
2347
- (IOLike m ) =>
2349
+ (HasCallStack , IOLike m ) =>
2348
2350
Cursor m k v b ->
2349
2351
m ()
2350
2352
closeCursor (Cursor cursor) =
0 commit comments