Skip to content

Commit 9bad32d

Browse files
authored
Merge pull request #2042 from IntersectMBO/erikd/drop-partial-functions
Drop use of partial List functions
2 parents 18ea549 + 4b077a9 commit 9bad32d

File tree

1 file changed

+1
-1
lines changed
  • cardano-db-sync/src/Cardano/DbSync/Ledger

1 file changed

+1
-1
lines changed

cardano-db-sync/src/Cardano/DbSync/Ledger/State.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ listMemorySnapshots env = do
705705
case AS.toNewestFirst $ ledgerDbCheckpoints ldb of
706706
[] -> []
707707
[a] -> [a]
708-
ls -> [List.head ls, List.last ls]
708+
(h : ls) -> catMaybes [Just h, lastMay ls]
709709
notGenesis GenesisPoint = False
710710
notGenesis (BlockPoint _ _) = True
711711

0 commit comments

Comments
 (0)