Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop ppx deriving #50

Merged
merged 3 commits into from
Oct 17, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Drop ppx deriving
ulrikstrid committed Oct 12, 2020

Verified

This commit was signed with the committer’s verified signature.
ulrikstrid Ulrik Strid
commit 71ea517cec3eef30d0b02e06f4377f3d8ec69d21
1 change: 0 additions & 1 deletion caqti.opam
Original file line number Diff line number Diff line change
@@ -14,7 +14,6 @@ depends: [
"dune" {>= "1.11"}
"logs"
"ocaml" {>= "4.04.0"}
"ppx_deriving"
"ptime"
"uri" {>= "1.9.0"}
]
9 changes: 8 additions & 1 deletion lib/caqti_query.ml
Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@ type t =
| Q of string
| P of int
| S of t list
[@@deriving eq]

let normal =
let rec collect acc = function
@@ -41,6 +40,14 @@ let normal =
| [q] -> q
| qs -> S qs)

let rec equal t1 t2 =
match t1, t2 with
| L s1, L s2 -> String.equal s1 s2
| Q s1, Q s2 -> String.equal s1 s2
| P i1, P i2 -> Int.equal i1 i2
| S l1, S l2 -> (try List.for_all2 equal l1 l2 with _ -> false)
| _ -> false

let hash = Hashtbl.hash

let rec pp ppf = function
3 changes: 1 addition & 2 deletions lib/dune
Original file line number Diff line number Diff line change
@@ -38,8 +38,7 @@
(private_modules
Caqti_compat)
(library_flags (:standard -linkall))
(libraries logs ptime uri)
(preprocess (pps ppx_deriving.eq)))
(libraries logs ptime uri))

(rule
(target caqti_compat.ml)