diff --git a/lib/term.ml b/lib/term.ml index 128590f..7e49062 100644 --- a/lib/term.ml +++ b/lib/term.ml @@ -20,6 +20,7 @@ type t = | App of t * t [@@deriving eq, ord, show] +(** string of Term *) let rec string_of_term = function | Var v -> "Var '" ^ v ^ "'" | IntConst n -> string_of_int n diff --git a/lib/type.ml b/lib/type.ml index acac45e..06a6af0 100644 --- a/lib/type.ml +++ b/lib/type.ml @@ -5,6 +5,7 @@ type t = | Arrow of t * t [@@deriving eq, ord, show] +(** string of Type *) let rec string_of_type = function | Var v -> "Var '" ^ v ^ "'" | Int -> "Int" diff --git a/lib/typeSubstitution.ml b/lib/typeSubstitution.ml index c6a5e41..cd12f65 100644 --- a/lib/typeSubstitution.ml +++ b/lib/typeSubstitution.ml @@ -39,6 +39,7 @@ let compose s2 s1 = s2 ;; +(** string of IdentifierMap *) let to_string map = let rec ty_str = function | Type.Var s -> "Var('" ^ s ^ "')" @@ -53,8 +54,10 @@ let to_string map = ^ "}" ;; +(** Find an element in an IdentifierMap *) let find = IdentifierMap.find_opt +(** Check if two IdentifierMap are equal *) let equal map1 map2 = let l_map1 = List.length (IdentifierMap.bindings map1) in let l_map2 = List.length (IdentifierMap.bindings map2) in