IntersectMBO / IntersectMBO/ouroboros-consensus

Delete `Ord` instance for `Point`

Open
#712 2 comments 0 reactions 0 assignees View on GitHub
:wastebasket: :question: possibly stale good first issue technical debt
Dominant language
Haskell
Stars
67
Forks
43
Avg merge
5d 13h
Merged PRs (30d)
43

Description

`Point`s are not totally ordered, and so the `Ord` instance is misleading (and has been the cause of various bugs). For the case where we store `Point`s in a `Map` or `Set`, we should introduce something like

```haskell
newtype WithArtificialOrdering a = WithArtificialOrdering {
unArtificialOrdering :: a
}

instance Ord (WithArtificialOrdering (Point blk)) where
..
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.