Skip to content

Commit f4a3bb5

Browse files
authored
Merge pull request #597 from IntersectMBO/dcoutts/trace-show-readability
Improve readability of numbers in traces and errors
2 parents 9607654 + 47c91ec commit f4a3bb5

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/Database/LSMTree/Internal/Paths.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ runChecksumsPath :: RunFsPaths -> FsPath
209209
runChecksumsPath = flip runFilePathWithExt "checksums"
210210

211211
runFilePathWithExt :: RunFsPaths -> String -> FsPath
212-
runFilePathWithExt (RunFsPaths dir n) ext =
212+
runFilePathWithExt (RunFsPaths dir (RunNumber n)) ext =
213213
dir </> mkFsPath [show n] <.> ext
214214

215215
runFileExts :: ForRunFiles String
@@ -311,7 +311,7 @@ writeBufferChecksumsPath :: WriteBufferFsPaths -> FsPath
311311
writeBufferChecksumsPath = flip writeBufferFilePathWithExt "checksums"
312312

313313
writeBufferFilePathWithExt :: WriteBufferFsPaths -> String -> FsPath
314-
writeBufferFilePathWithExt (WriteBufferFsPaths dir n) ext =
314+
writeBufferFilePathWithExt (WriteBufferFsPaths dir (RunNumber n)) ext =
315315
dir </> mkFsPath [show n] <.> ext
316316

317317

src/Database/LSMTree/Internal/RunNumber.hs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ module Database.LSMTree.Internal.RunNumber (
77
import Control.DeepSeq (NFData)
88

99
newtype RunNumber = RunNumber Int
10-
deriving newtype (Eq, Ord, Show, NFData)
10+
deriving stock (Eq, Ord, Show)
11+
deriving newtype (NFData)
1112

1213
newtype TableId = TableId Int
13-
deriving newtype (Eq, Ord, Show, NFData)
14+
deriving stock (Eq, Ord, Show)
15+
deriving newtype (NFData)
1416

1517
newtype CursorId = CursorId Int
16-
deriving newtype (Eq, Ord, Show, NFData)
18+
deriving stock (Eq, Ord, Show)
19+
deriving newtype (NFData)

0 commit comments

Comments
 (0)