Source code on Github
{-# OPTIONS --without-K #-}
module Class.HasOrder.Instance where

open import Class.DecEq
open import Class.Decidable
open import Class.HasOrder.Core
open import Data.Integer using ()
open import Data.Nat using ()
open import Data.Rational using ()
open import Data.Sum
open import Function
open import Relation.Nullary

instance
  import Data.Nat.Properties as Nat hiding (_≟_)
  ℕ-hasPreorder = HasPreorder  record {Nat; ≤⇔<∨≈ = let open Nat in mk⇔
     a≤b  case _  _ of λ where (yes p)  inj₂ p ; (no ¬p)  inj₁ (≤∧≢⇒< a≤b ¬p))
    [ <⇒≤ , ≤-reflexive ] }
  ℕ-hasPartialOrder = HasPartialOrder  record
    { ≤-antisym = Nat.≤-antisym }
  ℕ-hasDecPartialOrder = HasDecPartialOrder {A = }  record {}
  ℕ-hasTotalOrder = HasTotalOrder  record
    { ≤-total = Nat.≤-total }
  ℕ-hasDecTotalOrder = HasDecTotalOrder {A = }  record {}

  import Data.Integer.Properties as Int hiding (_≟_)
  ℤ-hasPreorder = HasPreorder  record {Int; ≤⇔<∨≈ = let open Int in mk⇔
     a≤b  case _  _ of λ where (yes p)  inj₂ p ; (no ¬p)  inj₁ (≤∧≢⇒< a≤b ¬p))
    [ <⇒≤ , ≤-reflexive ] }
  ℤ-hasPartialOrder = HasPartialOrder  record { ≤-antisym = Int.≤-antisym }
  ℤ-hasDecPartialOrder = HasDecPartialOrder {A = }  record {}
  ℤ-hasTotalOrder = HasTotalOrder  record
    { ≤-total = Int.≤-total }
  ℤ-hasDecTotalOrder = HasDecTotalOrder {A = }  record {}

  import Data.Rational.Properties as Rat hiding (_≟_)

  ℚ-hasPreorder = hasPreorderFromNonStrict Rat.≤-isPreorder _≟_
  ℚ-hasPartialOrder = HasPartialOrder  record { ≤-antisym = Rat.≤-antisym }
  ℚ-hasDecPartialOrder = HasDecPartialOrder {A = }  record {}
  ℚ-hasTotalOrder = HasTotalOrder  record
    { ≤-total = Rat.≤-total }
  ℚ-hasDecTotalOrder = HasDecTotalOrder {A = }  record {}