Module Middle.UnsizedType

Types which have dimensionalities but not sizes, e.g. array[,,]

type t =
  1. | UInt
  2. | UReal
  3. | UVector
  4. | UComplex
  5. | URowVector
  6. | UMatrix
  7. | UComplexVector
  8. | UComplexRowVector
  9. | UComplexMatrix
  10. | UArray of t
  11. | UTuple of t list
  12. | UFun of argumentlist * returntype * bool Fun_kind.suffix * Mem_pattern.t
  13. | UMathLibraryFunction
and autodifftype =
  1. | DataOnly
  2. | AutoDiffable
  3. | TupleAD of autodifftype list
and argumentlist = (autodifftype * t) list
and returntype =
  1. | Void
  2. | ReturnType of t
val compare_autodifftype : autodifftype -> autodifftype -> Core__.Import.int
val compare_argumentlist : argumentlist -> argumentlist -> Core__.Import.int
val compare_returntype : returntype -> returntype -> Core__.Import.int
val hash_fold_t : Ppx_hash_lib.Std.Hash.state -> t -> Ppx_hash_lib.Std.Hash.state
val hash_fold_autodifftype : Ppx_hash_lib.Std.Hash.state -> autodifftype -> Ppx_hash_lib.Std.Hash.state
val hash_fold_argumentlist : Ppx_hash_lib.Std.Hash.state -> argumentlist -> Ppx_hash_lib.Std.Hash.state
val hash_fold_returntype : Ppx_hash_lib.Std.Hash.state -> returntype -> Ppx_hash_lib.Std.Hash.state
val hash : t -> Ppx_hash_lib.Std.Hash.hash_value
val hash_autodifftype : autodifftype -> Ppx_hash_lib.Std.Hash.hash_value
val hash_argumentlist : argumentlist -> Ppx_hash_lib.Std.Hash.hash_value
val hash_returntype : returntype -> Ppx_hash_lib.Std.Hash.hash_value
val t_of_sexp : Sexplib0.Sexp.t -> t
val autodifftype_of_sexp : Sexplib0.Sexp.t -> autodifftype
val argumentlist_of_sexp : Sexplib0.Sexp.t -> argumentlist
val returntype_of_sexp : Sexplib0.Sexp.t -> returntype
val sexp_of_t : t -> Sexplib0.Sexp.t
val sexp_of_autodifftype : autodifftype -> Sexplib0.Sexp.t
val sexp_of_argumentlist : argumentlist -> Sexplib0.Sexp.t
val sexp_of_returntype : returntype -> Sexplib0.Sexp.t
val equal_autodifftype : autodifftype -> autodifftype -> Core__.Import.bool
val equal_argumentlist : argumentlist -> argumentlist -> bool
val equal_returntype : returntype -> returntype -> bool
val pp_tuple_autodifftype : autodifftype Fmt.t
val returntype_to_type_opt : returntype -> t option
val pp_autodifftype : Stdlib.Format.formatter -> autodifftype -> unit
val unsized_array_depth : t -> t * int
val count_dims : t -> int
val contains_tuple : t -> bool
val unwind_array_type : t -> t * int
val wind_array_type : (t * int) -> t
val pp : t Fmt.t
val pp_fun_arg : (autodifftype * t) Fmt.t
val pp_returntype : Stdlib.Format.formatter -> returntype -> unit
val autodifftype_can_convert : autodifftype -> autodifftype -> bool
val has_autodiff : autodifftype -> bool
val any_autodiff : autodifftype list -> bool
val lub_ad_type : autodifftype list -> autodifftype option
val common_type : (t * t) -> t option

Given two types find the minimal type both can convert to

val is_autodiffable : t -> bool
val is_autodifftype : autodifftype -> bool
val is_dataonlytype : autodifftype -> bool
val is_scalar_type : t -> bool
val promote_container : t -> t -> t
val is_discrete_type : t -> bool

Used to determine valid covariates for _lpmf functions

val is_int_type : t -> bool

Used in code generation and other places, does _not_ include tuples of ints

val is_complex_type : t -> bool
val internal_scalar : t -> t
val is_eigen_type : t -> bool
val is_fun_type : t -> bool
val contains_int : t -> bool

Detect if type contains an integer

val contains_eigen_type : t -> bool
val is_container : t -> bool
val is_array : t -> bool
val is_indexing_matrix : (t * 'a list) -> bool
val fill_adtype_for_type : autodifftype -> t -> autodifftype

In some places (e.g. code generation) we need to instantiate an AD type. Previously we would just say DataOnly or AutoDiffable, however this breaks the invariant that a Tuple always has TupleAD as it's autodifftype

val enumerate_tuple_names_io : string -> t -> string list

List all possible tuple sub-names for IO purposes. E.g, the decl array[2] (int, real) foo; should yield the list ["foo.1";"foo.2"].

module Comparator : sig ... end
include module type of struct include Comparator end
type comparator_witness = Comparator.comparator_witness
include sig ... end
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Base__.Or_error.t
val comparator : (t, Comparator.comparator_witness) Base__Comparator.comparator
val validate_lbound : min:t Core__.Maybe_bound.t -> t Validate.check
val validate_ubound : max:t Core__.Maybe_bound.t -> t Validate.check
val validate_bound : min:t Core__.Maybe_bound.t -> max:t Core__.Maybe_bound.t -> t Validate.check
module Replace_polymorphic_compare : sig ... end
module Map : sig ... end
module Set : sig ... end