Skip to content

Commit

Permalink
Set Pgx module to wrapped
Browse files Browse the repository at this point in the history
This makes us only expose the Pgx module at top-level.

Most of this stuff was never intended to be used directly, so the only
major change is that Pgx_value now _must_ be referenced as Pgx.Value.

Fixes #101
  • Loading branch information
brendanlong committed Jun 23, 2020
1 parent e3d789e commit 7fd117c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
1 change: 0 additions & 1 deletion pgx/src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ let () = Jbuild_plugin.V1.send @@ {|

(library
(public_name pgx)
(wrapped false)
(libraries hex ipaddr uuidm re sexplib0)
(preprocess (pps ppx_compare ppx_custom_printf ppx_sexp_conv |} ^ preprocess ^ {|)))
|}
2 changes: 1 addition & 1 deletion pgx/test/test_error_response.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Error_response
open Pgx.Error_response

let tests =
let info_msg =
Expand Down
1 change: 0 additions & 1 deletion pgx/test/test_pgx_value.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
open Pgx_aux
open Printf
open Sexplib0
open Sexplib0.Sexp_conv
Expand Down
4 changes: 2 additions & 2 deletions pgx_test/src/pgx_test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ module Alcotest_ext = struct
let pgx_value =
Alcotest.testable
(fun fmt t ->
Pgx_value.sexp_of_t t |> Sexplib0.Sexp.to_string_hum |> Format.pp_print_string fmt)
(fun a b -> Pgx_value.compare a b = 0)
Pgx.Value.sexp_of_t t |> Sexplib0.Sexp.to_string_hum |> Format.pp_print_string fmt)
(fun a b -> Pgx.Value.compare a b = 0)
;;
end

Expand Down
6 changes: 3 additions & 3 deletions pgx_value_core/src/pgx_value_core.mli
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
(** Pgx_value types using Core_kernel's Date and Time modules *)
open Core_kernel

type v = Pgx_value.v [@@deriving compare, sexp_of]
type t = Pgx_value.t [@@deriving compare, sexp_of]
type v = Pgx.Value.v [@@deriving compare, sexp_of]
type t = Pgx.Value.t [@@deriving compare, sexp_of]

include Pgx_value_intf.S with type v := v and type t := t
include module type of Pgx.Value with type v := v and type t := t

val of_date : Date.t -> t
val to_date_exn : t -> Date.t
Expand Down

0 comments on commit 7fd117c

Please sign in to comment.