diff --git a/main.ml b/main.ml index d66a948..12ca508 100644 --- a/main.ml +++ b/main.ml @@ -110,12 +110,16 @@ if !computetype_option then ( with e -> ( Printf.printf "Can't read lambda term\n"; 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 );