Skip to content

Commit abc1ee7

Browse files
committed
Make conversions to LookupResult total in the Normal and Monoidal API.
1 parent 6dbeb6f commit abc1ee7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Database/LSMTree/Monoidal.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ lookups (Internal.MonoidalTable t) ks =
241241
where
242242
toLookupResult (Just e) = case e of
243243
Entry.Insert v -> Found (Internal.deserialiseValue v)
244-
Entry.InsertWithBlob _ _ -> error "Monoidal.lookups: unexpected InsertWithBlob"
244+
Entry.InsertWithBlob v _ -> Found (Internal.deserialiseValue v)
245245
Entry.Mupdate v -> Found (Internal.deserialiseValue v)
246246
Entry.Delete -> NotFound
247247
toLookupResult Nothing = NotFound

src/Database/LSMTree/Normal.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ lookups (Internal.NormalTable t) ks =
332332
Entry.Insert v -> Found (Internal.deserialiseValue v)
333333
Entry.InsertWithBlob v br -> FoundWithBlob (Internal.deserialiseValue v)
334334
(BlobRef br)
335-
Entry.Mupdate _ -> error "Normal.lookups: unexpected Mupdate"
335+
Entry.Mupdate v -> Found (Internal.deserialiseValue v)
336336
Entry.Delete -> NotFound
337337
toLookupResult Nothing = NotFound
338338

0 commit comments

Comments
 (0)