Revert "Abandoning json conversion :("

This reverts commit 02780f5439.
This commit is contained in:
adelaett 2023-02-28 08:37:50 +01:00
parent 02780f5439
commit 631b6d77ff
3 changed files with 2 additions and 23 deletions

View File

@ -1,11 +1,7 @@
(library
(name catala_utils)
(public_name catala.catala_utils)
(libraries cmdliner ubase ANSITerminal re bindlib catala.runtime_ocaml)
(lint
(pps ppx_yojson_conv))
(preprocess
(pps ppx_yojson_conv)))
(libraries cmdliner ubase ANSITerminal re bindlib catala.runtime_ocaml))
(documentation
(package catala)

View File

@ -18,23 +18,6 @@
type ('a, 'm) t = 'a * 'm
type 'a pos = ('a, Pos.t) t
let pos_of_yojson :
'a.
(Ppx_yojson_conv_lib.Yojson.Safe.t -> 'a) ->
Ppx_yojson_conv_lib.Yojson.Safe.t ->
'a pos =
fun _of_a x -> _of_a x, Pos.no_pos
let _ = pos_of_yojson
let yojson_of_pos :
'a.
('a -> Ppx_yojson_conv_lib.Yojson.Safe.t) ->
'a pos ->
Ppx_yojson_conv_lib.Yojson.Safe.t =
fun of_a (a, _) -> of_a a
let _ = yojson_of_pos
let mark m e : ('a, 'm) t = e, m
let unmark ((x, _) : ('a, 'm) t) : 'a = x
let get_mark ((_, x) : ('a, 'm) t) : 'm = x

View File

@ -21,7 +21,7 @@ type ('a, 'm) t = 'a * 'm
(** Everything related to the source code should keep at least its position
stored, to improve error messages *)
type 'a pos = ('a, Pos.t) t [@@deriving yojson]
type 'a pos = ('a, Pos.t) t
(** The type of marks containing only position information *)
val mark : 'm -> 'a -> ('a, 'm) t