Commit 7a6e4bd3 authored by Julien Lopez's avatar Julien Lopez

[MINOR] Fix compilation of CDuce

parent 2b10e03f
...@@ -171,8 +171,8 @@ and compile_aux env = function ...@@ -171,8 +171,8 @@ and compile_aux env = function
and compile_abstr env a = and compile_abstr env a =
let fun_env, fun_name = let fun_env, fun_name =
match a.Typed.fun_name with match a.Typed.fun_name with
| Some x -> Env.add x (Env 0) Env.empty, [x, Types.cons a.Typed.fun_typ] | Some x -> Env.add x (Env 0) Env.empty, Ident.IdMap.singleton x (Types.cons a.Typed.fun_typ)
| None -> Env.empty, [] | None -> Env.empty, Ident.IdMap.empty
in in
let is_mono = let is_mono =
let vars = let vars =
...@@ -194,8 +194,8 @@ and compile_abstr env a = ...@@ -194,8 +194,8 @@ and compile_abstr env a =
(* we add a nameless empty slot for the argument *) (* we add a nameless empty slot for the argument *)
if is_mono then ([Dummy],1,fun_env) if is_mono then ([Dummy],1,fun_env)
else else
let argvar = fresharg () in let (x, y) = fresharg () in
([Dummy;Dummy],2,Env.add argvar (Env 1) fun_env) ([Dummy;Dummy],2,Env.add (Ns.Uri.from_int x, y) (Env 1) fun_env)
in in
let (slots,nb_slots,fun_env) = let (slots,nb_slots,fun_env) =
......
...@@ -44,11 +44,11 @@ let run_process cmd = ...@@ -44,11 +44,11 @@ let run_process cmd =
let process_status = function let process_status = function
| Unix.WEXITED n -> | Unix.WEXITED n ->
Value.Pair (Value.atom_ascii "exited", Value.ocaml2cduce_int n) Value.Pair (Value.atom_ascii "exited", Value.ocaml2cduce_int n, Value.Mono)
| Unix.WSTOPPED n -> | Unix.WSTOPPED n ->
Value.Pair (Value.atom_ascii "stopped", Value.ocaml2cduce_int n) Value.Pair (Value.atom_ascii "stopped", Value.ocaml2cduce_int n, Value.Mono)
| Unix.WSIGNALED n -> | Unix.WSIGNALED n ->
Value.Pair (Value.atom_ascii "signaled", Value.ocaml2cduce_int n) Value.Pair (Value.atom_ascii "signaled", Value.ocaml2cduce_int n, Value.Mono)
let system_out = let system_out =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment