src/Tools/Metis/src/Ordered.sml
author wenzelm
Wed, 16 Apr 2014 13:28:21 +0200
changeset 56603 4f45570e532d
parent 39502 cffceed8e7fa
child 72004 913162a47d9f
permissions -rw-r--r--
more uniform treatment of word case for check / complete;

(* ========================================================================= *)
(* ORDERED TYPES                                                             *)
(* Copyright (c) 2004 Joe Hurd, distributed under the BSD License            *)
(* ========================================================================= *)

structure IntOrdered =
struct type t = int val compare = Int.compare end;

structure IntPairOrdered =
struct

type t = int * int;

fun compare ((i1,j1),(i2,j2)) =
    case Int.compare (i1,i2) of
      LESS => LESS
    | EQUAL => Int.compare (j1,j2)
    | GREATER => GREATER;

end;

structure StringOrdered =
struct type t = string val compare = String.compare end;