Import Upstream version 20180207
[hcoop/debian/mlton.git] / lib / mlton / basic / bool.sml
CommitLineData
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
11structure Bool: BOOL =
12struct
13
14open Pervasive.Bool
15
16type t = bool
17
18val 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
26val equals =
27 fn (true, true) => true
28 | (false, false) => true
29 | _ => false
30
31val layout = Layout.str o toString
32(*fun output(b, out) = Pervasive.IO.output(out, toString b)*)
33
34end