-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3b5393e
commit d302c83
Showing
1 changed file
with
31 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,34 @@ | ||
|
||
$ echo "type ('a, 'b) either [@@deriving json]" | ../browser/ppx_deriving_json_js_test.exe -intf - | ||
type ('a, 'b) either[@@deriving json] | ||
include | ||
$ echo "module type S = sig type ('a, 'b) either [@@deriving json] end" | ./run.sh | ||
=== ppx output:native === | ||
module type S = | ||
sig | ||
[@@@ocaml.warning "-32"] | ||
val either_of_json : | ||
(Js.Json.t -> 'a) -> (Js.Json.t -> 'b) -> Js.Json.t -> ('a, 'b) either | ||
val either_to_json : | ||
('a -> Js.Json.t) -> ('b -> Js.Json.t) -> ('a, 'b) either -> Js.Json.t | ||
end[@@ocaml.doc "@inline"][@@merlin.hide ] | ||
|
||
$ echo "type ('a, 'b) either [@@deriving json]" | ../native/ppx_deriving_json_native_test.exe -intf - | ||
type ('a, 'b) either[@@deriving json] | ||
include | ||
type ('a, 'b) either[@@deriving json] | ||
include | ||
sig | ||
[@@@ocaml.warning "-32"] | ||
val either_of_json : | ||
(Yojson.Basic.t -> 'a) -> | ||
(Yojson.Basic.t -> 'b) -> Yojson.Basic.t -> ('a, 'b) either | ||
val either_to_json : | ||
('a -> Yojson.Basic.t) -> | ||
('b -> Yojson.Basic.t) -> ('a, 'b) either -> Yojson.Basic.t | ||
end[@@ocaml.doc "@inline"][@@merlin.hide ] | ||
end | ||
=== ppx output:browser === | ||
module type S = | ||
sig | ||
[@@@ocaml.warning "-32"] | ||
val either_of_json : | ||
(Yojson.Basic.t -> 'a) -> | ||
(Yojson.Basic.t -> 'b) -> Yojson.Basic.t -> ('a, 'b) either | ||
val either_to_json : | ||
('a -> Yojson.Basic.t) -> | ||
('b -> Yojson.Basic.t) -> ('a, 'b) either -> Yojson.Basic.t | ||
end[@@ocaml.doc "@inline"][@@merlin.hide ] | ||
type ('a, 'b) either[@@deriving json] | ||
include | ||
sig | ||
[@@@ocaml.warning "-32"] | ||
val either_of_json : | ||
(Js.Json.t -> 'a) -> | ||
(Js.Json.t -> 'b) -> Js.Json.t -> ('a, 'b) either | ||
val either_to_json : | ||
('a -> Js.Json.t) -> | ||
('b -> Js.Json.t) -> ('a, 'b) either -> Js.Json.t | ||
end[@@ocaml.doc "@inline"][@@merlin.hide ] | ||
end | ||
=== stdout:native === | ||
=== stdout:js === |