Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ New features:
Bugfixes:

Other improvements:
- Fix warnings revealed by `v0.14.1` PS release (#213)

## [v6.0.0](https://github.com/purescript/purescript-arrays/releases/tag/v6.0.0) - 2021-02-26

Expand Down
2 changes: 1 addition & 1 deletion src/Data/Array.purs
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ nubBy comp xs = case head indexedAndSorted of
Just x -> map snd $ sortWith fst $ ST.run do
-- TODO: use NonEmptyArrays here to avoid partial functions
result <- STA.unsafeThaw $ singleton x
ST.foreach indexedAndSorted \pair@(Tuple i x') -> do
ST.foreach indexedAndSorted \pair@(Tuple _ x') -> do
lst <- snd <<< unsafePartial (fromJust <<< last) <$> STA.unsafeFreeze result
when (comp lst x' /= EQ) $ void $ STA.push pair result
STA.unsafeFreeze result
Expand Down