summaryrefslogtreecommitdiffstats
path: root/bytecomp/printlambda.ml
diff options
context:
space:
mode:
authorJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2013-09-30 11:35:15 +0000
committerJacques Garrigue <garrigue at math.nagoya-u.ac.jp>2013-09-30 11:35:15 +0000
commit4c5e9bbe6b98d6138f7943f7b017fbd411f109c8 (patch)
treef13f0f262d7e2894a1b0bb03d17b6b69afbe790e /bytecomp/printlambda.ml
parente686ed503a467f0ce081b3bc16bc133edc17c1fd (diff)
mostly works, but:
* a strange bug in open * spurious bindings in the lambda code git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14200 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'bytecomp/printlambda.ml')
-rw-r--r--bytecomp/printlambda.ml7
1 files changed, 5 insertions, 2 deletions
diff --git a/bytecomp/printlambda.ml b/bytecomp/printlambda.ml
index 8774e72b8..46e47ec08 100644
--- a/bytecomp/printlambda.ml
+++ b/bytecomp/printlambda.ml
@@ -255,12 +255,15 @@ let rec lam ppf = function
fprintf ppf ")" in
fprintf ppf "@[<2>(function%a@ %a)@]" pr_params params lam body
| Llet(str, id, arg, body) ->
+ let kind = function
+ Alias -> "a" | Strict -> "" | StrictOpt -> "o" | Variable -> "v" in
let rec letbody = function
| Llet(str, id, arg, body) ->
- fprintf ppf "@ @[<2>%a@ %a@]" Ident.print id lam arg;
+ fprintf ppf "@ @[<2>%a =%s@ %a@]" Ident.print id (kind str) lam arg;
letbody body
| expr -> expr in
- fprintf ppf "@[<2>(let@ @[<hv 1>(@[<2>%a@ %a@]" Ident.print id lam arg;
+ fprintf ppf "@[<2>(let@ @[<hv 1>(@[<2>%a =%s@ %a@]"
+ Ident.print id (kind str) lam arg;
let expr = letbody body in
fprintf ppf ")@]@ %a)@]" lam expr
| Lletrec(id_arg_list, body) ->