Backport from sid to buster
[hcoop/debian/mlton.git] / basis-library / util / string-comparisons.sml
1 (* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
2 * Jagannathan, and Stephen Weeks.
3 * Copyright (C) 1997-2000 NEC Research Institute.
4 *
5 * MLton is released under a BSD-style license.
6 * See the file MLton-LICENSE for details.
7 *)
8
9 functor StringComparisons (type t
10 val compare: t * t -> order) =
11 struct
12 fun < (x, y) =
13 (case compare (x, y) of
14 LESS => true
15 | _ => false)
16 fun <= (x, y) =
17 (case compare (x, y) of
18 GREATER => false
19 | _ => true)
20 fun > (x, y) =
21 (case compare (x, y) of
22 GREATER => true
23 | _ => false)
24 fun >= (x, y) =
25 (case compare (x, y) of
26 LESS => false
27 | _ => true)
28 end