Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
damiendoligez committed Oct 4, 2019
1 parent 46ca153 commit 454ee52
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ Working version
- #8992: share argument implementations between executables
(Florian Angeletti, review by Gabriel Scherer)

- #9015: fix fatal error in pprint_ast (#8789)
(Damien Doligez, review by ...)

### Code generation and optimizations:

- #8990: amd64: Emit 32bit registers for Iconst_int when we can
Expand Down
11 changes: 10 additions & 1 deletion parsing/pprintast.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,10 @@ and structure_item ctxt f x =
(module_type ctxt) typ
(module_expr ctxt) expr
(item_attributes ctxt) pmb.pmb_attributes
| _ -> assert false
| pmb ->
pp f "@[<hov2>@ and@ %s@ =@ %a@]%a" pmb.pmb_name.txt
(module_expr ctxt) pmb.pmb_expr
(item_attributes ctxt) pmb.pmb_attributes
in
begin match decls with
| ({pmb_expr={pmod_desc=Pmod_constraint (expr, typ)}} as pmb) :: l2 ->
Expand All @@ -1403,6 +1406,12 @@ and structure_item ctxt f x =
(module_expr ctxt) expr
(item_attributes ctxt) pmb.pmb_attributes
(fun f l2 -> List.iter (aux f) l2) l2
| pmb :: l2 ->
pp f "@[<hv>@[<hov2>module@ rec@ %s@ =@ %a@]%a@ %a@]"
pmb.pmb_name.txt
(module_expr ctxt) pmb.pmb_expr
(item_attributes ctxt) pmb.pmb_attributes
(fun f l2 -> List.iter (aux f) l2) l2
| _ -> assert false
end
| Pstr_attribute a -> floating_attribute ctxt f a
Expand Down

0 comments on commit 454ee52

Please sign in to comment.