let confere_tipo msg tinf tdec =
if tinf <> tdec
then failwith (msg ^ " deve ser do tipo " ^ tinf)
File "semantico.ml", line 50, characters 0-3:
Error: Syntax error
What am I doing wrong?
let confere_tipo msg tinf tdec =
if tinf <> tdec
then failwith (msg ^ " deve ser do tipo " ^ tinf)
File "semantico.ml", line 50, characters 0-3:
Error: Syntax error
What am I doing wrong?
This function looks valid, so your problem is in the code preceding it. I assume that this function starts on line 50, and according to your error message the compiler is offended by the first three characters of line 50, which would be let. My guess is that the expression immediately preceding this function was not properly terminated. The dirty way to fix this would be to add a ;; before this function is declared, but it would be easier to fix if I could see a bit more of your code.