File: stdcompat__bool.ml.in

package info (click to toggle)
ocaml-stdcompat 19-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,516 kB
  • sloc: ml: 27,806; sh: 875; makefile: 246
file content (28 lines) | stat: -rw-r--r-- 401 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
@BEGIN_FROM_4_08_0@
include Bool
@END_FROM_4_08_0@
@BEGIN_BEFORE_4_08_0@
type t = bool =
  | false 
  | true

let not = not

external (&&) : bool -> bool -> bool = "%sequand"

external (||) : bool -> bool -> bool = "%sequor"

let equal = ( = )

let compare = compare

let to_int b =
  if b then 1
  else 0

let to_float b =
  if b then 1.
  else 0.

let to_string = string_of_bool
@END_BEFORE_4_08_0@