summaryrefslogtreecommitdiff
path: root/utils.ml
diff options
context:
space:
mode:
authorGuillaume Seguin <guillaume@segu.in>2009-01-22 03:47:44 +0100
committerGuillaume Seguin <guillaume@segu.in>2009-01-22 03:47:44 +0100
commitcf49ee2c3be57ac2c5ce6d1c46ab885d0241b3c9 (patch)
treea32627519963dfc5e6c26d5de67b27b0c967dd46 /utils.ml
parent31af8ce34d769ceebb207f9a5b972fa4a1bda511 (diff)
downloadpetitcaml-cf49ee2c3be57ac2c5ce6d1c46ab885d0241b3c9.tar.gz
petitcaml-cf49ee2c3be57ac2c5ce6d1c46ab885d0241b3c9.tar.bz2
[petitcaml] Improve motif string rebuilding
Diffstat (limited to 'utils.ml')
-rw-r--r--utils.ml6
1 files changed, 5 insertions, 1 deletions
diff --git a/utils.ml b/utils.ml
index 9e39258..3690c2c 100644
--- a/utils.ml
+++ b/utils.ml
@@ -154,7 +154,11 @@ let rec rebuild_motif m =
| Mtuple (m::motifs) ->
let base = rebuild_motif m
in
- List.fold_left (motif_tuple_folder rebuild_motif) base motifs
+ let s = List.fold_left (motif_tuple_folder rebuild_motif)
+ base
+ motifs
+ in
+ Printf.sprintf "(%s)" s
| Mtuple [] -> "" (* Avoids an useless warning *)
let rec print_types expr =