Commit | Line | Data |
---|---|---|
7f918cf1 CE |
1 | (* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh |
2 | * Jagannathan, and Stephen Weeks. | |
3 | * | |
4 | * MLton is released under a BSD-style license. | |
5 | * See the file MLton-LICENSE for details. | |
6 | *) | |
7 | (*-------------------------------------------------------------------*) | |
8 | (* Bool *) | |
9 | (*-------------------------------------------------------------------*) | |
10 | ||
11 | structure Bool: BOOL = | |
12 | struct | |
13 | ||
14 | open Pervasive.Bool | |
15 | ||
16 | type t = bool | |
17 | ||
18 | val compare = | |
19 | let open Relation | |
20 | in fn (false, false) => EQUAL | |
21 | | (false, true) => LESS | |
22 | | (true, false) => GREATER | |
23 | | (true, true) => EQUAL | |
24 | end | |
25 | ||
26 | val equals = | |
27 | fn (true, true) => true | |
28 | | (false, false) => true | |
29 | | _ => false | |
30 | ||
31 | val layout = Layout.str o toString | |
32 | (*fun output(b, out) = Pervasive.IO.output(out, toString b)*) | |
33 | ||
34 | end |