@@ -75303,10 +75303,6 @@ val lambda : Format.formatter -> Lam.t -> unit
7530375303
7530475304val primitive: Format.formatter -> Lam_primitive.t -> unit
7530575305
75306-
75307-
75308- val env_lambda : Env.t -> Format.formatter -> Lam.t -> unit
75309-
7531075306val seriaize : string -> Lam.t -> unit
7531175307
7531275308val lambda_to_string : Lam.t -> string
@@ -75706,7 +75702,7 @@ let get_string ((id : Ident.t), (pos : int)) (env : Env.t) : string =
7570675702
7570775703
7570875704
75709- let lambda use_env env ppf v =
75705+ let lambda ppf v =
7571075706 let rec lam ppf (l : Lam.t) = match l with
7571175707 | Lvar id ->
7571275708 Ident.print ppf id
@@ -75745,18 +75741,10 @@ let lambda use_env env ppf v =
7574575741 "@[<2>(let@ (@[<hv 1>%a@]" bindings (List.rev args);
7574675742 fprintf ppf ")@ %a)@]" lam body
7574775743 | Lprim {
75748- primitive = Pfield (n,_ );
75744+ primitive = Pfield (n,Fld_module s );
7574975745 args = [ Lglobal_module id ]
75750- ; _} when use_env ->
75751- fprintf ppf "%s.%s/%d" id.name (get_string (id,n) env) n
75752-
75753- | Lprim {
75754- primitive = Psetfield (n,_);
75755- args = [ Lglobal_module id ;
75756- e ]
75757- ; _} when use_env ->
75758- fprintf ppf "@[<2>(%s.%s/%d <- %a)@]" id.name (get_string (id,n) env) n
75759- lam e
75746+ ; _} ->
75747+ fprintf ppf "%s.%s/%d" id.name s n
7576075748 | Lprim{primitive = prim; args = largs; _} ->
7576175749 let lams ppf largs =
7576275750 List.iter (fun l -> fprintf ppf "@ %a" lam l) largs in
@@ -75848,8 +75836,6 @@ let lambda use_env env ppf v =
7584875836
7584975837let structured_constant = struct_const
7585075838
75851- let env_lambda = lambda true
75852- let lambda = lambda false Env.empty
7585375839
7585475840let rec flatten_seq acc (lam : Lam.t) =
7585575841 match lam with
@@ -75887,10 +75873,10 @@ let lambda_as_module env ppf (lam : Lam.t) =
7588775873 (fun (left, l) ->
7588875874 match left with
7588975875 | Id { kind = k; id } ->
75890- fprintf ppf "@[<2>%a =%s@ %a@]@." Ident.print id (kind k) (env_lambda env) l
75876+ fprintf ppf "@[<2>%a =%s@ %a@]@." Ident.print id (kind k) lambda l
7589175877 | Nop ->
7589275878
75893- fprintf ppf "@[<2>%a@]@." (env_lambda env) l
75879+ fprintf ppf "@[<2>%a@]@." lambda l
7589475880 )
7589575881
7589675882 @@ List.rev rest
@@ -75900,7 +75886,7 @@ let lambda_as_module env ppf (lam : Lam.t) =
7590075886 end
7590175887 (* | _ -> raise Not_a_module *)
7590275888 with _ ->
75903- env_lambda env ppf lam;
75889+ lambda ppf lam;
7590475890 fprintf ppf "; lambda-failure"
7590575891
7590675892let seriaize (filename : string) (lam : Lam.t) : unit =
@@ -101312,7 +101298,10 @@ type t =
101312101298
101313101299(** Tricky to be complete *)
101314101300
101315- val pp_group : Env.t -> Format.formatter -> t -> unit
101301+ val pp_group :
101302+ Format.formatter ->
101303+ t ->
101304+ unit
101316101305
101317101306val single :
101318101307 Lam_compat.let_kind ->
@@ -101383,17 +101372,17 @@ let str_of_kind (kind : Lam_compat.let_kind) =
101383101372 | StrictOpt -> "o"
101384101373 | Variable -> "v"
101385101374
101386- let pp_group env fmt ( x : t) =
101375+ let pp_group fmt ( x : t) =
101387101376 match x with
101388101377 | Single (kind, id, lam) ->
101389101378 Format.fprintf fmt "@[let@ %a@ =%s@ @[<hv>%a@]@ @]" Ident.print id (str_of_kind kind)
101390- ( Lam_print.env_lambda env) lam
101379+ Lam_print.lambda lam
101391101380 | Recursive lst ->
101392101381 List.iter (fun (id,lam) ->
101393101382 Format.fprintf fmt
101394- "@[let %a@ =r@ %a@ @]" Ident.print id ( Lam_print.env_lambda env) lam
101383+ "@[let %a@ =r@ %a@ @]" Ident.print id Lam_print.lambda lam
101395101384 ) lst
101396- | Nop lam -> Lam_print.env_lambda env fmt lam
101385+ | Nop lam -> Lam_print.lambda fmt lam
101397101386
101398101387
101399101388
0 commit comments