Skip to content

Commit

Permalink
Add explanatory comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jonludlam committed Sep 15, 2023
1 parent ae5bc8b commit 6e51617
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/odoc/odoc_link.ml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ let from_odoc ~resolver ~warnings_options input output =
link_unit ~resolver ~filename m
|> handle_warnings ~input_warnings ~warnings_options
>>= fun (m, warnings) ->
(* Remove the shape here so that we only depend upon odoc types
rather than odoc and ocaml types. This means we should be able
save an odocl file with odoc x.y compiled with one version of
the compiler and load it in odoc x.y compiled with a different
version of the compiler. This is an important use case for
voodoo. *)
let m = { m with Odoc_model.Lang.Compilation_unit.shape = None } in
Odoc_file.save_unit output ~warnings m;
Ok (`Module m)

0 comments on commit 6e51617

Please sign in to comment.