summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuc Maranget <luc.maranget@inria.fr>2008-06-18 08:44:04 +0000
committerLuc Maranget <luc.maranget@inria.fr>2008-06-18 08:44:04 +0000
commit90053f2b68bfa1ea798fc24995c74de1089be510 (patch)
tree452ee2db07b1001f6d780a0319c68c0cb96584f4
parentf274c562f9eafa1b679a4bfb692c1475ee9a58b9 (diff)
downloadocaml-treematch.tar.gz
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/treematch@8892 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--bytecomp/discr.ml1
-rw-r--r--bytecomp/heuristic.ml4
2 files changed, 4 insertions, 1 deletions
diff --git a/bytecomp/discr.ml b/bytecomp/discr.ml
index 3aa51d7f84..3907da60c8 100644
--- a/bytecomp/discr.ml
+++ b/bytecomp/discr.ml
@@ -28,6 +28,7 @@ type discr =
let p_discr chan = function
| Variant (lab,_,_) -> Printf.fprintf chan "`%s" lab
| _ -> ()
+
let arity d = match d with
| Constant _ -> 0
| Construct c -> c.cstr_arity
diff --git a/bytecomp/heuristic.ml b/bytecomp/heuristic.ml
index 7abe3b84ef..7736a04628 100644
--- a/bytecomp/heuristic.ml
+++ b/bytecomp/heuristic.ml
@@ -385,7 +385,9 @@ let build h xs mat =
| 'p' -> directions xs mat
| 'q' -> prefix xs mat
| 'r' -> nrows xs mat
- | 'L' -> (fun ks -> [left xs ks])
+ | 'N' -> (fun ks -> [left xs ks])
+ | 'L' -> (fun ks -> [leftright xs ks])
+ | 'R' -> (fun ks -> [rightleft xs ks])
| 'i' -> (fun x -> x)
| c -> Misc.fatal_error (sprintf "Bad heuristic: %c" c) in
compose h1 h2 in