package smtml

  1. Overview
  2. Docs

doc/src/smtml/binder.ml.html

Source file binder.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
(* SPDX-License-Identifier: MIT *)
(* Copyright (C) 2023-2026 formalsec *)
(* Written by Hichem Rami Ait El Hara *)

(* Dolmen's binders *)
type t =
  | Forall
  | Exists
  | Let_in
[@@deriving ord]

let equal a b =
  match (a, b) with
  | Forall, Forall | Exists, Exists | Let_in, Let_in -> true
  | (Forall | Exists | Let_in), _ -> false

let hash = function Forall -> 0 | Exists -> 1 | Let_in -> 2

let pp fmt = function
  | Forall -> Fmt.string fmt "forall"
  | Exists -> Fmt.string fmt "exists"
  | Let_in -> Fmt.string fmt "let"