-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change RunNumber rep to Int, and add TableId and CursorId newtypes
RunNumber is rather unnecessarily a Word64 when Int would do just fine and involve fewer conversions. Also add TableId and CursorId newtypes (rather than raw Word64) and make these use Int too for the same reasons. Add and use direct conversion functions uniqueTo{Table,Cursor}Id.
- Loading branch information
Showing
9 changed files
with
53 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
module Database.LSMTree.Internal.RunNumber ( | ||
RunNumber (..), | ||
TableId (..), | ||
CursorId (..), | ||
) where | ||
|
||
import Control.DeepSeq (NFData) | ||
import Data.Word (Word64) | ||
|
||
newtype RunNumber = RunNumber Word64 | ||
newtype RunNumber = RunNumber Int | ||
deriving newtype (Eq, Ord, Show, NFData) | ||
|
||
newtype TableId = TableId Int | ||
deriving newtype (Eq, Ord, Show, NFData) | ||
|
||
newtype CursorId = CursorId Int | ||
deriving newtype (Eq, Ord, Show, NFData) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters