Commit 7d201c5d authored by POTTIER Francois's avatar POTTIER Francois

Use the package [result], for compatibility with OCaml 4.02.

parent f0430069
...@@ -20,5 +20,6 @@ depends: [ ...@@ -20,5 +20,6 @@ depends: [
"ocamlbuild" {build} "ocamlbuild" {build}
"ppx_tools" "ppx_tools"
"ppx_deriving" {>= "4.0"} "ppx_deriving" {>= "4.0"}
"result"
] ]
available: [ ocaml-version >= "4.03" ] available: [ ocaml-version >= "4.03" ]
open Result
open Longident open Longident
open Asttypes open Asttypes
open Parsetree open Parsetree
......
...@@ -12,6 +12,14 @@ ...@@ -12,6 +12,14 @@
(* -------------------------------------------------------------------------- *) (* -------------------------------------------------------------------------- *)
(* For compatibility with OCaml 4.02, we take the type [('a, 'b) result] from
the package [result]. This type appeared in the standard library in OCaml
4.03. *)
open Result
(* -------------------------------------------------------------------------- *)
(* [array_equal eq xs1 xs2] tests whether the arrays [xs1] and [xs2] have the (* [array_equal eq xs1 xs2] tests whether the arrays [xs1] and [xs2] have the
same components. The arrays must have the same length. The components are same components. The arrays must have the same length. The components are
compared using [eq]. *) compared using [eq]. *)
......
open Result
open VisitorsString open VisitorsString
open List open List
let sprintf = Printf.sprintf let sprintf = Printf.sprintf
......
true: \ true: \
debug, \ debug, \
safe_string, \ safe_string, \
warn(A-4-44) warn(A-4-44), \
package(result)
not <VisitorsRuntime.*>: \ not <VisitorsRuntime.*>: \
package(compiler-libs.common), \ package(compiler-libs.common), \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment