Modernize Index module to use modern record extensions#860
Conversation
|
Hello, @jorisdral I've made a pr that modernizes the Index module by adopting modern language extensions. Ready for review. I plan to work on Internal/Merge.hs and Internal/RunAcc.h next. |
|
@mwihoti I think your |
0cdbad5 to
2a9c035
Compare
extension scope
- Remove unnecessary parentheses around dot-access expressions (value.field)
- Only enable DuplicateRecordFields/NoFieldSelectors in Run and RunReader
where field names were actually refactored; other modules get
OverloadedRecordDot only
Unsafe.hs: restore parens around function applications
Config/Override.hs: fix corrupted override instance for MergeBatchSize
Benchmarks: update to dot syntax with renamed fields (bloomFilter, index,
kOpsFile) and add OverloadedRecordDot pragma to both benchmark files
…dFields,NoFieldSelectors, OverloadedRecordDo) replacing RecordWildCards usage in Index/CompactAcc.hs and Index/Compact.hs
2a9c035 to
1af54e9
Compare
|
Hi @jorisdral, hope you are well sorry about the conflicts, I've rebased the branch, no more conflicts. if everything is good I plan to work on Internal/Merge.hs and Internal/RunAcc.hs. Thanks |
|
There are still some merge conflict artifacts, see https://github.com/IntersectMBO/lsm-tree/pull/860/files |
|
Hello, I fixed the conflicts, builds successfully |
Description
Modernize the Index module to use modern Haskell record extensions (
DuplicateRecordFields,NoFieldSelectors,OverloadedRecordDot) instead ofRecordWildCards.This change replaces record wildcard patterns with explicit dot notation field access, making the code more maintainable and aligned with modern Haskell best practices.Updated
Index/CompactAcc.hs:IndexCompactAcc{..}wildcards with explicit parameter binding and dot notationica.fieldsyntaxUpdated
Index/Compact.hs:IndexCompact{..}wildcards with explicit parameter binding and dot notationidx.fieldsyntaxcountClashes,hasClashes,sizeInPagesto use lambda syntaxUpdated test file
test/Test/Database/LSMTree/Internal/Index/Compact.hs:pilot for (Use
DuplicateRecordFields,NoFieldSelectors, andOverloadedRecordDot#811)Checklist