Skip to content

Commit

Permalink
Refreshed lock file, removed cbor dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenldl committed Dec 25, 2024
1 parent bdbb132 commit 219a57c
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 49 deletions.
58 changes: 32 additions & 26 deletions docfd.opam.locked
Original file line number Diff line number Diff line change
Expand Up @@ -10,42 +10,48 @@ homepage: "https://github.com/darrenldl/docfd"
doc: "https://github.com/darrenldl/docfd"
bug-reports: "https://github.com/darrenldl/docfd/issues"
depends: [
"alcotest" {= "1.7.0" & with-test}
"angstrom" {= "0.16.0"}
"alcotest" {= "1.8.0" & with-test}
"angstrom" {= "0.16.1"}
"astring" {= "0.8.5" & with-test}
"base-bigarray" {= "base"}
"base-bytes" {= "base"}
"base-domains" {= "base"}
"base-nnp" {= "base"}
"base-threads" {= "base"}
"base-unix" {= "base"}
"bigstringaf" {= "0.9.1"}
"bigstringaf" {= "0.10.0"}
"cbor" {= "0.5"}
"checkseum" {= "0.5.2"}
"cmdliner" {= "1.3.0"}
"containers" {= "3.13.1"}
"containers-data" {= "3.13.1"}
"cppo" {= "1.6.9"}
"conf-pkg-config" {= "3"}
"conf-sqlite3" {= "1"}
"containers" {= "3.14"}
"containers-data" {= "3.14"}
"cppo" {= "1.7.0"}
"csexp" {= "1.5.2"}
"cstruct" {= "6.2.0"}
"decompress" {= "1.5.3"}
"diet" {= "0.4"}
"digestif" {= "1.2.0"}
"domain-local-await" {= "1.0.1"}
"dune" {= "3.15.3"}
"dune-configurator" {= "3.15.3"}
"eio" {= "1.0"}
"eio_linux" {= "1.0"}
"eio_main" {= "1.0"}
"eio_posix" {= "1.0"}
"dune" {= "3.16.1"}
"dune-configurator" {= "3.16.1"}
"eio" {= "1.1"}
"eio_linux" {= "1.1"}
"eio_main" {= "1.1"}
"eio_posix" {= "1.1"}
"either" {= "1.0.0"}
"eqaf" {= "0.9"}
"eqaf" {= "0.10"}
"fmt" {= "0.9.0"}
"hmap" {= "0.8.1"}
"host-arch-x86_64" {= "1"}
"host-system-other" {= "1"}
"iomux" {= "0.3"}
"logs" {= "0.7.0"}
"lwd" {= "0.3"}
"lwt" {= "5.7.0"}
"lwt" {= "5.8.0"}
"lwt-dllist" {= "1.0.1"}
"mtime" {= "2.0.0"}
"mtime" {= "2.1.0"}
"nottui" {= "0.3"}
"notty" {= "0.2.3"}
"ocaml" {= "5.2.0"}
Expand All @@ -54,27 +60,28 @@ depends: [
"ocaml-config" {= "3"}
"ocaml-options-vanilla" {= "1"}
"ocaml-syntax-shims" {= "1.0.0"}
"ocamlbuild" {= "0.14.3"}
"ocamlbuild" {= "0.15.0"}
"ocamlfind" {= "1.9.6"}
"ocplib-endian" {= "1.2"}
"optint" {= "0.3.0"}
"oseq" {= "0.5.1"}
"ounit2" {= "2.2.7" & with-test}
"ppx_derivers" {= "1.2.1"}
"ppx_deriving" {= "5.2.1"}
"ppxlib" {= "0.32.1"}
"ppx_deriving" {= "6.0.3"}
"ppxlib" {= "0.33.0"}
"progress" {= "0.4.0"}
"psq" {= "0.2.1"}
"ptime" {= "1.1.0"}
"qcheck" {= "0.21.3" & with-test}
"qcheck-alcotest" {= "0.21.3" & with-test}
"qcheck-core" {= "0.21.3" & with-test}
"qcheck-ounit" {= "0.21.3" & with-test}
"re" {= "1.11.0"}
"ptime" {= "1.2.0"}
"qcheck" {= "0.22" & with-test}
"qcheck-alcotest" {= "0.22" & with-test}
"qcheck-core" {= "0.22" & with-test}
"qcheck-ounit" {= "0.22" & with-test}
"re" {= "1.12.0"}
"result" {= "1.5"}
"seq" {= "base"}
"sexplib0" {= "v0.17.0"}
"spelll" {= "0.4"}
"sqlite3" {= "5.2.0"}
"stdlib-shims" {= "0.3.0"}
"terminal" {= "0.4.0"}
"thread-table" {= "1.0.0"}
Expand All @@ -83,10 +90,9 @@ depends: [
"timedesc-tzlocal" {= "3.1.0"}
"topkg" {= "1.0.7"}
"uring" {= "0.9"}
"uucp" {= "15.1.0"}
"uucp" {= "16.0.0"}
"uutf" {= "1.0.3"}
"vector" {= "1.0.0"}
"yojson" {= "2.1.2"}
]
build: [
["dune" "subst"] {dev}
Expand Down
1 change: 0 additions & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ Features:
(ppx_deriving (>= "5.0"))
decompress
progress
cbor
diet
sqlite3
(alcotest :with-test)
Expand Down
1 change: 0 additions & 1 deletion lib/dune
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
decompress.gz
bigstringaf
unix
cbor
diet
sqlite3
)
Expand Down
21 changes: 0 additions & 21 deletions lib/index.ml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,6 @@ module Line_loc = struct

let compare (x : t) (y : t) =
Int.compare x.global_line_num y.global_line_num

let to_cbor (t : t) : CBOR.Simple.t =
`Array [ `Int t.page_num; `Int t.line_num_in_page; `Int t.global_line_num ]

let of_cbor (cbor : CBOR.Simple.t) : t option =
match cbor with
| `Array [ `Int page_num; `Int line_num_in_page; `Int global_line_num ] ->
Some { page_num; line_num_in_page; global_line_num }
| _ -> None
end

module Loc = struct
Expand All @@ -35,18 +26,6 @@ module Loc = struct
let line_loc t = t.line_loc

let pos_in_line t = t.pos_in_line

let to_cbor (t : t) : CBOR.Simple.t =
`Array [ Line_loc.to_cbor t.line_loc; `Int t.pos_in_line ]

let of_cbor (cbor : CBOR.Simple.t) : t option =
match cbor with
| `Array [ line_loc; `Int pos_in_line ] -> (
match Line_loc.of_cbor line_loc with
| None -> None
| Some line_loc -> Some { line_loc; pos_in_line }
)
| _ -> None
end

module Raw = struct
Expand Down

0 comments on commit 219a57c

Please sign in to comment.