Skip to content

Commit

Permalink
Make odate work with OCaml >4.06 and OPAM >2.0 (#5)
Browse files Browse the repository at this point in the history
* Use new-style Stdlib rather than Pervasives.

* Update the opam file for opam 2.x
  • Loading branch information
dmbaturin authored Nov 17, 2020
1 parent bf0bcf1 commit db1341b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
15 changes: 11 additions & 4 deletions odate.opam
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
opam-version: "1.2"
opam-version: "2.0"
maintainer: "[email protected]"
authors: [ "Hugo Heuzard" ]
license: "LGPL-2.1 with OCaml linking exception"
homepage: "https://github.com/hhugo/odate"
build: [
["dune" "build" "--only" "odate" "--root" "." "-j" jobs "@install"]
["dune" "subst"] {pinned}
["dune" "build" "-p" name "-j" jobs]
]
depends: [
"ocaml" {>= "4.07.0"}
"dune" {build}
"menhir" {build}
"base-unix"
]
synopsis: "Date & Duration Library"
description: """
Simple date and duration manipulation. Also implement duration printer
based on string format. Already implemented in opalang
[http://opalang.org/]. For documentation about the format, see :
[http://doc.opalang.org/value/stdlib.core.date/Duration/try_generate_printer].
"""
dev-repo: "git://github.com/hhugo/odate"
available: [ ocaml-version >= "4.00.0" ]

2 changes: 1 addition & 1 deletion src/duration_private.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module P = Pervasives
module P = Stdlib

module O : sig

Expand Down
2 changes: 1 addition & 1 deletion src/oDate.ml
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ end
module MakeImplem(C : Clock) : Implem = struct
type t = float

let compare = Pervasives.compare
let compare = Stdlib.compare

let add f i = f +. i
let from_seconds x = x
Expand Down

0 comments on commit db1341b

Please sign in to comment.