diff --git a/flap/src/hopix/hopixTypechecker.ml b/flap/src/hopix/hopixTypechecker.ml index f4caabb..d65a001 100644 --- a/flap/src/hopix/hopixTypechecker.ml +++ b/flap/src/hopix/hopixTypechecker.ml @@ -49,10 +49,12 @@ let rec check_pattern_linearity and linearity_variable v vars = if List.mem v.value vars - then - HopixTypes.type_error - v.position - "Il y a déjà une occurence de la variable dans le pattern" + then ( + match v.value with + | Id i -> + HopixTypes.type_error + v.position + (Printf.sprintf "The variable %s has already appeared in this pattern." i)) else v.value :: vars and linearity_pattern_list plist vars =