-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.
Milestone
Description
Updated description
The target end point: https://gist.github.com/alexcrichton/10945968
Original issue
- rename
Ord
->PartialOrd
- rename
TotalOrd
->Ord
- rename
Eq
->PartialEq
- rename
TotalEq
->Eq
-
PartialOrd
inherits fromPartialEq
-
Ord
inherits fromEq
-
Ord
inherits fromPartialOrd
-
Eq
inherits fromPartialEq
- remove
equals
method (TotalEq
deriving needs to be redone) - deriving
Ord
also derivesPartialOrd
- deriving
Eq
also derivesPartialEq
An implementation of Eq
will simply mean that the PartialEq
implementation provides equivalence rather than partial equivalence. An Ord
implementation will add a single cmp
method and the guarantee of the PartialOrd
implementation providing a total order.
This allows code generic over Float
to use the operators, since it will inherit from PartialEq
and PartialOrd
. Code generic over Eq
and Ord
will also be able to use the operators, despite not being designed to handle a partial order.
Metadata
Metadata
Assignees
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.