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
and compile_abstr env a =
let fun_env, fun_name =
match a.Typed.fun_name with
| Some x -> Env.add x (Env 0) Env.empty, [x, Types.cons a.Typed.fun_typ]
| None -> Env.empty, []
| Some x -> Env.add x (Env 0) Env.empty, Ident.IdMap.singleton x (Types.cons a.Typed.fun_typ)
| None -> Env.empty, Ident.IdMap.empty
in
let is_mono =
let vars =
......@@ -194,8 +194,8 @@ and compile_abstr env a =
(* we add a nameless empty slot for the argument *)
if is_mono then ([Dummy],1,fun_env)
else
let argvar = fresharg () in
([Dummy;Dummy],2,Env.add argvar (Env 1) fun_env)
let (x, y) = fresharg () in
([Dummy;Dummy],2,Env.add (Ns.Uri.from_int x, y) (Env 1) fun_env)
in
let (slots,nb_slots,fun_env) =
......
......@@ -44,11 +44,11 @@ let run_process cmd =
let process_status = function
| 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 ->
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 ->
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 =
......
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