summaryrefslogtreecommitdiff
path: root/caml/RTLtypingaux.ml
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2008-12-29 13:12:08 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2008-12-29 13:12:08 +0000
commit1bce6b0f9f8cd614038a6e7fc21fb984724204a4 (patch)
tree48683822666bc49b0101ed78f4d5059e834eb492 /caml/RTLtypingaux.ml
parent12421d717405aa7964e437fc1167a23699b61ecc (diff)
Extract Coq lists to Caml lists.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@929 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'caml/RTLtypingaux.ml')
-rw-r--r--caml/RTLtypingaux.ml12
1 files changed, 6 insertions, 6 deletions
diff --git a/caml/RTLtypingaux.ml b/caml/RTLtypingaux.ml
index 6c43227..ff704eb 100644
--- a/caml/RTLtypingaux.ml
+++ b/caml/RTLtypingaux.ml
@@ -32,8 +32,8 @@ let set_type r ty =
let rec set_types rl tyl =
match rl, tyl with
- | Coq_nil, Coq_nil -> ()
- | Coq_cons(r1, rs), Coq_cons(ty1, tys) -> set_type r1 ty1; set_types rs tys
+ | [], [] -> ()
+ | r1 :: rs, ty1 :: tys -> set_type r1 ty1; set_types rs tys
| _, _ -> raise (Type_error "arity mismatch")
(* First pass: process constraints of the form typeof(r) = ty *)
@@ -98,16 +98,16 @@ let type_instr retty (Coq_pair(pc, i)) =
end
let type_pass1 retty instrs =
- coqlist_iter (type_instr retty) instrs
+ List.iter (type_instr retty) instrs
(* Second pass: extract move constraints typeof(r1) = typeof(r2)
and solve them iteratively *)
let rec extract_moves = function
- | Coq_nil -> []
- | Coq_cons(Coq_pair(pc, i), rem) ->
+ | [] -> []
+ | Coq_pair(pc, i) :: rem ->
match i with
- | Iop(Omove, Coq_cons(r1, Coq_nil), r2, _) ->
+ | Iop(Omove, [r1], r2, _) ->
(r1, r2) :: extract_moves rem
| Iop(Omove, _, _, _) ->
raise (Type_error "wrong Omove")