Petites modifs

This commit is contained in:
Adrien Vannson 2022-05-18 16:44:34 +02:00
parent d631cd3e93
commit 819ce2d6de
No known key found for this signature in database
GPG Key ID: FE2E66FD978C1A55

12
main.ml
View File

@ -112,10 +112,14 @@ if !computetype_option then (
raise e
)
in
begin
match (computeType [] lambda_term) with
| Some t -> Printf.printf "The type of %s is %s\n" (string_of_lam lambda_term) (string_of_ty t)
| None -> Printf.printf "λ-term %s cannot be typed ! (Therfore, it has to be either wrong or not closed)\n" (string_of_lam lambda_term)
begin match (computeType [] lambda_term) with
| Some t ->
Printf.printf "The type of %s is %s\n" (string_of_lam lambda_term) (string_of_ty t)
| None -> (
Printf.printf
"λ-term %s can't be typed! (it is not closed or not typable)\n"
(string_of_lam lambda_term)
)
end;
exit 0
);