File tree Expand file tree Collapse file tree 1 file changed +11
-26
lines changed Expand file tree Collapse file tree 1 file changed +11
-26
lines changed Original file line number Diff line number Diff line change @@ -641,42 +641,27 @@ let extractEmbedded ~extensionPoints ~filename =
641641 ])
642642 |> List. rev |> array
643643
644+ (* * Dump the contents of a typed tree file *)
644645let dump entryPointFile =
645646 let path =
646- match Filename. is_relative entryPointFile with
647- | true -> Unix. realpath entryPointFile
648- | false -> entryPointFile
647+ if Filename. is_relative entryPointFile then Unix. realpath entryPointFile
648+ else entryPointFile
649649 in
650650 let result =
651- match
651+ if
652652 FindFiles. isImplementation path = false
653653 && FindFiles. isInterface path = false
654- with
655- | false -> (
656- let path =
657- if FindFiles. isImplementation path then
658- let pathAsResi =
659- (path |> Filename. dirname) ^ " /"
660- ^ (path |> Filename. basename |> Filename. chop_extension)
661- ^ " .resi"
662- in
663- if Sys. file_exists pathAsResi then (
664- Printf. printf " preferring found resi file for impl: %s\n " pathAsResi;
665- pathAsResi)
666- else path
667- else path
668- in
654+ then
655+ Error
656+ (Printf. sprintf
657+ " error: failed to read %s, expected an .res or .resi file" path)
658+ else
669659 match Cmt. loadFullCmtFromPath ~path with
670660 | None ->
671661 Error
672662 (Printf. sprintf
673- " error: failed to generate doc for %s, try to build the project"
674- path)
675- | Some full -> Ok (Print_tast. print_full full))
676- | true ->
677- Error
678- (Printf. sprintf
679- " error: failed to read %s, expected an .res or .resi file" path)
663+ " error: failed to dump for %s, try to build the project" path)
664+ | Some full -> Ok (Print_tast. print_full full)
680665 in
681666
682667 result
You can’t perform that action at this time.
0 commit comments