add interface for compatibility between Eq and Ord
Dependencies
- [2]
VCJVFB63add total ordering
Change contents
- file addition: EqOrd.idr[2.19]
module Control.EqOrd--Eq and Ord compatibilitypublic exportinterface Ord ty => EqOrd ty whereeqord : (x, y : ty) -> (x == y) = (compare x y == EQ)exportEqOrd Nat whereeqord 0 0 = Refleqord 0 (S _) = Refleqord (S _) 0 = Refleqord (S i) (S j) = eqord i j