Module Utils.Prelude

Most-used helper functions, Stdlib extensions

val pp_option : 'a Fmt.t -> 'a option Fmt.t

Option pretty-printer

val pp_list : ?sep:unit Fmt.t -> 'a Fmt.t -> 'a list Fmt.t

List pretty-printer

val of_yojson_string : (Yojson.Safe.t -> ('a, 'b) Stdlib.result) -> string -> 'a

Given an of_yojson function, converts a string to the desired type

Extension of Hashtbl with functions to serialize to and deserialize from yojson, along with some other helpers

Extension of Map with functions to serialize to and deserialize from yojson

Represents a set of values, with no duplicates

Extension of Stack with functions to serialize to and deserialize from yojson

module Syntaxes = Gillian.Utils.Syntaxes
val opt_to_yojson : ('a -> Yojson.Safe.t) -> 'a option -> Yojson.Safe.t

Converts an Option to yojson

val list_to_yojson : ('a -> Yojson.Safe.t) -> 'a list -> [> `List of Yojson.Safe.t list ]

Converts a list of values to yojson