Module Gist.Expr

Type expressions for gist processors.

This is typegist's view on the OCaml type expression language.

type 'a t =
  1. | Scalar : 'a Scalar.t -> 'a t
  2. | Tuple : 't Tuple.t -> 't t
  3. | Record : 'r Record.t -> 'r t
  4. | Variant_like : 'v Variant_like.t -> 'v t
  5. | Array_like : ('elt, 'array) Array_like.t -> 'array t
  6. | Map_like : ('k, 'v, 'map) Map_like.t -> 'map t
  7. | Cell_like : 'a Cell_like.t -> 'a t
  8. | Func : ('a, 'b) Func.t -> ('a -> 'b) t
  9. | Abstract : 'a Abstract.t -> 'a t
  10. | Map : ('a, 'b) Map.t -> 'a t
  11. | Rec : 'a gist lazy_t -> 'a t

The type for type expressions.

val pp : Stdlib.Format.formatter -> 'a t -> unit

pp formats a valid OCaml type expression for the type gist expression. Named typed gists found in the expression are not expanded to their definition.

val pp_expanded : Stdlib.Format.formatter -> 'a t -> unit

pp_expanded is like pp but expands all named type gists to their type definition. The result is not a valid OCaml type expression.