diff --git a/lib/miniFun/TypeChecker.ml b/lib/miniFun/TypeChecker.ml index 107a3bb..7220519 100644 --- a/lib/miniFun/TypeChecker.ml +++ b/lib/miniFun/TypeChecker.ml @@ -5,7 +5,8 @@ Random.self_init () let (let*) = Result.bind -let evaluate_type_polimorphic (_program: t_exp) (_context: typingshape) : (typingshape, error) result = +let evaluate_type_polimorphic (_program: t_exp) (_context: typingshape) + : (typingshape, error) result = failwith "Not implemented" (* match program with *) (* Integer _ -> Ok (VariableMap.empty, IntegerType) *) @@ -13,7 +14,7 @@ let evaluate_type_polimorphic (_program: t_exp) (_context: typingshape) : (typin (* | Variable x -> ( *) (* match (VariableMap.find_opt x (fst context)) with *) (* (None) -> ( *) - (* let u = PolimorphicType (Utility.fromIntToString !globalIdentifier) in *) + (* let u = PolimorphicType (Utility.from_int_to_string !globalIdentifier) in *) (* globalIdentifier := !globalIdentifier + 1; *) (* Ok (VariableMap.singleton x u, u) *) (* ) *) diff --git a/lib/utility/utility.ml b/lib/utility/utility.ml index 2c46703..88f80c4 100644 --- a/lib/utility/utility.ml +++ b/lib/utility/utility.ml @@ -15,13 +15,13 @@ let rec powmod a d = function let alphabet = "abcdefghijklmnopqrstuvwxyz" let base = 26 -let rec fromIntToString (x: int) : string = +let rec from_int_to_string (x: int) : string = if x < 0 then "" else if x < base then String.get alphabet x |> String.make 1 else - (fromIntToString (x/base - 1)) ^ (String.get alphabet (x mod base) |> String.make 1) + (from_int_to_string (x/base - 1)) ^ (String.get alphabet (x mod base) |> String.make 1) let int_and a b = match (a>0, b>0) with @@ -169,4 +169,3 @@ let rec combine_twice la lb = | [a], [b] -> [a, b] | a::la, b::lb -> (a, b) :: (combine_twice la lb) | _ -> [] ->>>>>>> cfg diff --git a/lib/utility/utility.mli b/lib/utility/utility.mli index 5a00d90..208da9a 100644 --- a/lib/utility/utility.mli +++ b/lib/utility/utility.mli @@ -1,7 +1,7 @@ val pow : int -> int -> int val powmod : int -> int -> int -> int -val fromIntToString : int -> string +val from_int_to_string : int -> string val int_and : int -> int -> int val int_or : int -> int -> int