From bfb79a12ce2dd5d3630b5f2b0d1f0123c9cb4610 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Wed, 6 Dec 2023 18:15:16 +0100 Subject: [PATCH] test-46 --- flap/src/hopix/hopixTypechecker.ml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 =