summaryrefslogtreecommitdiff
path: root/closure.ml
diff options
context:
space:
mode:
authorGuillaume Seguin <guillaume@segu.in>2009-01-23 02:46:05 +0100
committerGuillaume Seguin <guillaume@segu.in>2009-01-23 02:46:05 +0100
commitf04320e3595b661a21660bf3df2ba502bfc154a3 (patch)
tree9ff6308601034b3ce0de69f38af7deae4e218914 /closure.ml
parent836d8929467aaee4ef0ba4de15c87b0df8e3c08c (diff)
downloadpetitcaml-f04320e3595b661a21660bf3df2ba502bfc154a3.tar.gz
petitcaml-f04320e3595b661a21660bf3df2ba502bfc154a3.tar.bz2
[petitcaml] Simplify function name handling through motifs usage
Diffstat (limited to 'closure.ml')
-rw-r--r--closure.ml7
1 files changed, 4 insertions, 3 deletions
diff --git a/closure.ml b/closure.ml
index 07a6662..e860888 100644
--- a/closure.ml
+++ b/closure.ml
@@ -21,9 +21,10 @@ let rec new_function_label idents =
(* Petit helper, générant un identifiant à la volée si nécessaire *)
let get_function_name idents f =
- match f.name with
- | None -> new_function_label idents
- | Some s -> s
+ match f.name.m with
+ | Munderscore -> new_function_label idents
+ | Mident s -> s
+ | _ -> failwith "get_function_name : Unreachable matching"
(* Calcul des identifiants d'un motif *)
let rec motif_vars m =