Module Cobol_typeck.Condition

type abbrev_implied_parts =
  1. | Nothing
  2. | ImpliedRelOp
  3. | ImpliedSubjectAndRelOp
val add_implied_relop : abbrev_implied_parts -> abbrev_implied_parts
type abbrev_condition_expansion_state = {
  1. subject : Cobol_procedure.Types.expr Cobol_common.Srcloc.TYPES.with_loc option;
  2. relop : Cobol_ptree.relop Cobol_common.Srcloc.TYPES.with_loc option;
  3. unused : abbrev_implied_parts;
  4. changed_in_parens : abbrev_implied_parts;
}

abbrev_condition_expansion_state is used internally by expand_abbrev_cond to remember the previous subject and relational operator that are implied in the abbreviation.

val no_subject_state : abbrev_condition_expansion_state
type object_bool_expr_disambiguation =
  1. | CondBoolExpr
  2. | CondObject
  3. | CondResolveError
val disambiguate_object_vs_bool_expr : Cobol_procedure.Types.expr -> object_bool_expr_disambiguation
val warn_before_state_reset : abbrev_condition_expansion_state -> Cobol_typeck__.Typeck_diagnostics.diagnostic list
val use_and_reset_subject : f: (Cobol_procedure.Types.expr Cobol_common.Srcloc.TYPES.with_loc -> ('a, unit) Stdlib.result Cobol_common__Srcloc.TYPES.with_loc) -> missing_subject_error:Cobol_typeck__.Typeck_condition_diagnostics.error -> abbrev_condition_expansion_state -> Cobol_typeck__.Typeck_procedure_monad.env -> Cobol_typeck__.Typeck_outputs.references_acc -> (('a, unit) Stdlib.result Cobol_common__Srcloc.TYPES.with_loc * abbrev_condition_expansion_state) * Cobol_typeck__.Typeck_outputs.references_acc
val expand_abbrev_cond : Cobol_ptree.condition Cobol_common.Srcloc.TYPES.with_loc -> abbrev_condition_expansion_state -> Cobol_typeck__.Typeck_procedure_monad.env -> Cobol_typeck__.Typeck_outputs.references_acc -> (Cobol_procedure.Types.condition Cobol_procedure.Types.or_error Cobol_common.Srcloc.TYPES.with_loc * abbrev_condition_expansion_state) * Cobol_typeck__.Typeck_outputs.references_acc
val expand_condition : Cobol_ptree.condition Cobol_common.Srcloc.TYPES.with_loc -> Cobol_typeck__.Typeck_procedure_monad.env -> Cobol_typeck__.Typeck_outputs.references_acc -> Cobol_procedure.Types.condition Cobol_procedure.Types.or_error Cobol_common.Srcloc.TYPES.with_loc * Cobol_typeck__.Typeck_outputs.references_acc
val expand_selection_subject : Cobol_ptree.selection_subject Cobol_common.Srcloc.TYPES.with_loc -> Cobol_typeck__.Typeck_procedure_monad.env -> Cobol_typeck__.Typeck_outputs.references_acc -> Cobol_procedure.Types.selection_subject Cobol_procedure.Types.or_error Cobol_common.Srcloc.TYPES.with_loc * Cobol_typeck__.Typeck_outputs.references_acc
val expand_selection_object : Cobol_procedure.Types.selection_subject Cobol_common__Srcloc.TYPES.with_loc -> Cobol_ptree.selection_object Cobol_common.Srcloc.TYPES.with_loc -> Cobol_typeck__.Typeck_procedure_monad.env -> Cobol_typeck__.Typeck_outputs.references_acc -> Cobol_procedure.Types.selection_object Cobol_procedure.Types.or_error Cobol_common.Srcloc.TYPES.with_loc * Cobol_typeck__.Typeck_outputs.references_acc
val expand_selection_subjects : Cobol_ptree.selection_subject Cobol_common.Srcloc.TYPES.with_loc list -> Cobol_typeck__.Typeck_procedure_monad.env -> Cobol_typeck__.Typeck_outputs.references_acc -> Cobol_procedure.Types.selection_subject Cobol_procedure.Types.or_error Cobol_common.Srcloc.TYPES.with_loc list * Cobol_typeck__.Typeck_outputs.references_acc
val expand_selection_objects : (Cobol_procedure.Types.selection_subject, unit) Stdlib.result Cobol_common.Srcloc.TYPES.with_loc list -> Cobol_ptree.selection_object Cobol_common__Srcloc.TYPES.with_loc list -> Cobol_typeck__.Typeck_procedure_monad.env -> Cobol_typeck__.Typeck_outputs.references_acc -> Cobol_procedure.Types.selection_object Cobol_procedure.Types.or_error Cobol_common.Srcloc.TYPES.with_loc list * Cobol_typeck__.Typeck_outputs.references_acc

Expands one list of selection objects of a WHEN clause, given the expanded EVALUATE subjects. Objects are ill-typed when their subject is ill-typed (without any further error), or when there is no corresponding subject.