Skip to content

Unbound type constructor Result.result #143

@thierry-FreeBSD

Description

@thierry-FreeBSD

Trying to compile ppx_deriving_yojson v3.6.1 on FreeBSD, with OCaml 4.12.1 and dune 2.8.0 gives the following error:

File "src/ppx_deriving_yojson_runtime.mli", line 1, characters 32-45:
1 | type 'a error_or = ('a, string) Result.result
                                    ^^^^^^^^^^^^^
Error: Unbound type constructor Result.result

This simple patch fixes it:

--- src/ppx_deriving_yojson_runtime.mli.orig    2020-11-07 23:40:55 UTC
+++ src/ppx_deriving_yojson_runtime.mli
@@ -1,4 +1,4 @@
-type 'a error_or = ('a, string) Result.result
+type 'a error_or = ('a, string) Result.t
 
 val ( >>= ) : 'a error_or -> ('a -> 'b error_or) -> 'b error_or
 val ( >|= ) : 'a error_or -> ('a -> 'b) -> 'b error_or
@@ -18,7 +18,7 @@ module Int64 : (module type of Int64)
 module Nativeint : (module type of Nativeint)
 module Array : (module type of Array)
 module Result : sig
-  type ('a, 'b) result = ('a, 'b) Result.result =
+  type ('a, 'b) result = ('a, 'b) Result.t =
     | Ok of 'a
     | Error of 'b
 end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions