Module type Catala_runtime.ExternalTypeSpec

This interface must be supplied to extend the Catala runtime with abstract types

type t

The embedded type

val name : string

Catala name of the type (capitalised)

val equal : code_location -> t -> t -> bool
val compare : code_location -> t -> t -> int

Standard compare function: must return -1, 0 or 1 depending on whether the left-hand side is respectively smaller, equal or greater than the right-hand side

val print : t -> string

User-directed printing of the value

val to_json : t -> string
val from_json : code_location -> string -> t