For many data structures having an ordering is necessary. This one adds the `Ord` type class and a deriving handler for it. The ordering is based on order of constructors followed by lexicographical ordering within a constructor.
15 lines
491 B
Text
15 lines
491 B
Text
/-
|
|
Copyright (c) 2020 Microsoft Corporation. All rights reserved.
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
Authors: Leonardo de Moura
|
|
-/
|
|
import Lean.Elab.Deriving.Basic
|
|
import Lean.Elab.Deriving.Util
|
|
import Lean.Elab.Deriving.Inhabited
|
|
import Lean.Elab.Deriving.BEq
|
|
import Lean.Elab.Deriving.DecEq
|
|
import Lean.Elab.Deriving.Repr
|
|
import Lean.Elab.Deriving.FromToJson
|
|
import Lean.Elab.Deriving.SizeOf
|
|
import Lean.Elab.Deriving.Hashable
|
|
import Lean.Elab.Deriving.Ord
|