package saltoIL

  1. Overview
  2. Docs
  • author Pierre Lermusiaux <pierre.lermusiaux@inria.fr>
  • author Benoît Montagu <benoit.montagu@inria.fr>

Copyright © Inria 2022-2023

val get_mutable_flag : ('a -> Types.label_description) -> 'a list -> Asttypes.mutable_flag

get_mutable_flag f fields returns Immutable if all fields are immutable, or Mutable otherwise

module Construct : sig ... end
type t =
  1. | Bot
  2. | Any of Types.type_expr
    (*

    _

    *)
  3. | Var of Salto_id.Id.t * Types.type_expr
    (*

    x

    *)
  4. | Alias of t * Salto_id.Id.t * Types.type_expr
    (*

    P as a

    *)
  5. | Constant of Asttypes.constant
    (*

    1, 'a', "true", 1.0, 1l, 1L, 1n

    *)
  6. | Construct of Construct.t * t list
  7. | Lazy of t
    (*

    lazy P

    *)
  8. | Plus of t * t * Types.row_desc option
  9. | Compl of t * t

typ of extended patterns

val same_any : t -> bool

same_any p checks if p is equivalent to the pattern Any

val same : t -> t -> bool

same p1 p2 checks if p1 and p2 are equivalent patterns (assuming p1 and p2 have the same type)

val get_variables : t -> (Salto_id.Id.t * Types.type_expr) list

get_variables p returns the lists of variable names and types in the pattern p

val free_other_variables : t -> Salto_id.Id.t list -> t

free_other_variables p xs returns the pattern p where all variables not in xs have been freed (i.e. replaced by Any)

OCaml

Innovation. Community. Security.