Skip to content

Commit

Permalink
Refactor: fix typo and print user loc
Browse files Browse the repository at this point in the history
Signed-off-by: Alpha DIALLO <moyodiallo@gmail.com>
  • Loading branch information
moyodiallo committed Jun 9, 2023
1 parent 833cfb6 commit 1172a74
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions bin/describe.ml
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ module External_lib_deps = struct
external_resolved_libs setup super_context >>| to_dyn context_name
end

module Pacakge_entries = struct
module Package_entries = struct
let get super_context =
let open Memo.O in
let+ package_entries =
Expand Down Expand Up @@ -881,7 +881,7 @@ module What = struct
let some = Memo.map ~f:(fun x -> Some x) in
match t with
| Opam_files -> Opam_files.get () |> some
| Package_entries -> Pacakge_entries.get super_context |> some
| Package_entries -> Package_entries.get super_context |> some
| External_lib_deps -> External_lib_deps.get setup super_context |> some
| Workspace { dirs } ->
let context = Super_context.context super_context in
Expand Down
6 changes: 3 additions & 3 deletions src/dune_rules/install.ml
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,13 @@ module Entry = struct

let to_dyn { src; kind; dst; section } =
let open Dyn in
let kind_to_dyn = function
let dyn_of_kind = function
| `File -> String "file"
| `Directory -> String "directory"
in
record
[ ("src", Path.Build.to_dyn src)
; ("kind", kind_to_dyn kind)
; ("kind", dyn_of_kind kind)
; ("dst", Dst.to_dyn dst)
; ("section", Section.to_dyn section)
]
Expand All @@ -293,7 +293,7 @@ module Entry = struct
let open Dyn in
let source_to_dyn = function
| Dune -> String "dune"
| User _ -> String "user"
| User loc -> Variant ("user", [ Loc.to_dyn loc ])
in
Record [ ("source", source_to_dyn source); ("entry", to_dyn entry) ]
end
Expand Down

0 comments on commit 1172a74

Please sign in to comment.