File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/ImmutableDB/Chunks Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ import GHC.Generics (Generic)
4949import NoThunks.Class (NoThunks )
5050import Ouroboros.Consensus.Block
5151import Ouroboros.Consensus.Util.CallStack
52- import Ouroboros.Consensus.Util.RedundantConstraints
52+ import Ouroboros.Consensus.Util.RedundantConstraints ( keepRedundantConstraint )
5353
5454-- | Size of the chunks of the immutable DB
5555--
@@ -251,35 +251,41 @@ data ChunkAssertionFailure
251251
252252instance Exception ChunkAssertionFailure
253253
254+ {- FOURMOLU_DISABLE -}
254255assertSameChunk :: HasCallStack => ChunkNo -> ChunkNo -> a -> a
255256#if ENABLE_ASSERTIONS
256257assertSameChunk a b
257258 | a == b = id
258259 | otherwise = throw $ NotSameChunk a b prettyCallStack
259260#else
260261assertSameChunk _ _ = id
262+ #endif
261263 where
262264 _ = keepRedundantConstraint (Proxy @ HasCallStack )
263- #endif
265+ {- FOURMOLU_ENABLE -}
264266
267+ {- FOURMOLU_DISABLE -}
265268assertWithinBounds :: HasCallStack => Word64 -> ChunkSize -> a -> a
266269#if ENABLE_ASSERTIONS
267270assertWithinBounds ix sz
268271 | ix <= maxRelativeIndex sz = id
269272 | otherwise = throw $ NotWithinBounds ix sz prettyCallStack
270273#else
271274assertWithinBounds _ _ = id
275+ #endif
272276 where
273277 _ = keepRedundantConstraint (Proxy @ HasCallStack )
274- #endif
278+ {- FOURMOLU_ENABLE -}
275279
280+ {- FOURMOLU_DISABLE -}
276281assertChunkCanContainEBB :: HasCallStack => ChunkNo -> ChunkSize -> a -> a
277282#if ENABLE_ASSERTIONS
278283assertChunkCanContainEBB chunk size
279284 | chunkCanContainEBB size = id
280285 | otherwise = throw $ ChunkCannotContainEBBs chunk prettyCallStack
281286#else
282287assertChunkCanContainEBB _ _ = id
288+ #endif
283289 where
284290 _ = keepRedundantConstraint (Proxy @ HasCallStack )
285- #endif
291+ {- FOURMOLU_ENABLE -}
You can’t perform that action at this time.
0 commit comments