1234567891011121314151617181920212223242526272829303132333435363738394041424344454647# 2 "bool.ml"(**************************************************************************)(* *)(* OCaml *)(* *)(* The OCaml programmers *)(* *)(* Copyright 2018 Institut National de Recherche en Informatique et *)(* en Automatique. *)(* *)(* All rights reserved. This file is distributed under the terms of *)(* the GNU Lesser General Public License version 2.1, with the *)(* special exception on linking described in the file LICENSE. *)(* *)(**************************************************************************)open!Stdlib[@@@ocaml.flambda_o3]typet=bool=false|trueexternalnot:bool->bool@@portable="%boolnot"external(&&):bool->bool->bool@@portable="%sequand"external(||):bool->bool->bool@@portable="%sequor"letequal:bool->bool->bool=(=)letcompare:bool->bool->int=Stdlib.compareexternalto_int:bool->int@@portable="%identity"letto_float=functionfalse->0.|true->1.(*
let of_string = function
| "false" -> Some false
| "true" -> Some true
| _ -> None
*)letto_string=functionfalse->"false"|true->"true"(* [caml_hash_exn] doesn't raise on booleans, so it's safe for
it to be marked as [@@noalloc].
*)externalseeded_hash_param:int->int->int->bool->int@@portable="caml_hash_exn"[@@noalloc]letseeded_hashseedx=seeded_hash_param10100seedxlethashx=seeded_hash_param101000x