Skip to content

Commit 84857d4

Browse files
authored
Merge pull request #776 from jasagredo/js/iog-contra-tracer
Allow IOG's contra-tracer
2 parents 6453290 + c0e0182 commit 84857d4

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

lsm-tree.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ library
600600
, bytestring ^>=0.11.4.0 || ^>=0.12.1.0
601601
, cborg ^>=0.2.10.0
602602
, containers ^>=0.6 || ^>=0.7
603-
, contra-tracer ^>=0.2
603+
, contra-tracer ^>=0.1 || ^>=0.2
604604
, crc32c ^>=0.2.1
605605
, deepseq ^>=1.4 || ^>=1.5
606606
, filepath

src/Database/LSMTree/Internal/Unsafe.hs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,12 +317,19 @@ data TableTrace =
317317
#endif
318318
deriving stock (Show, Eq)
319319

320-
contramapTraceMerge :: Monad m => Tracer m TableTrace -> Tracer m (AtLevel MergeTrace)
320+
contramapTraceMerge :: forall m. Monad m => Tracer m TableTrace -> Tracer m (AtLevel MergeTrace)
321+
#if MIN_VERSION_contra_tracer(0,2,0)
321322
#ifdef DEBUG_TRACES
322323
contramapTraceMerge t = TraceMerge `contramap` t
323324
#else
324325
contramapTraceMerge t = traceMaybe (const Nothing) t
325326
#endif
327+
#else
328+
contramapTraceMerge _t = nullTracer
329+
where
330+
-- See #766
331+
_unused = pure @m ()
332+
#endif
326333

327334
-- | Trace messages related to cursors.
328335
data CursorTrace =

0 commit comments

Comments
 (0)