Module Cobol_dialect.Types

type id =
  1. | Default
  2. | GnuCOBOL
  3. | COBOL85
  4. | COBOL2002
  5. | COBOL2014
  6. | ACU of strictness
  7. | BS2000 of strictness
  8. | GCOS of strictness
  9. | IBM of strictness
  10. | MicroFocus of strictness
  11. | MVS of strictness
  12. | Realia of strictness
  13. | RM of strictness
  14. | XOpen
  15. | From_file of string
and strictness = {
  1. strict : bool;
}
type origin = {
  1. id : id;
  2. display_name : string;
    (*

    name in configuration files

    *)
  3. file : string option;
  4. ancestry : id list;
    (*

    dialects of included configurations, then id; each after those it includes

    *)
}

Description of a dialect configuration.

type 'a support =
  1. | Ok of 'a
  2. | Warning of 'a
  3. | Archaic of 'a
  4. | Obsolete of 'a
  5. | Skip
  6. | Ignore
  7. | Error
  8. | Unconformable

Support levels of dialect features; those that accept a feature may carry a feature-specific value. unit support are the levels found in configuration files.

type feature_info = {
  1. name : string;
  2. short : Pretty.simple option;
  3. doc : Pretty.simple;
}
type 'a feature = {
  1. info : feature_info;
  2. of_level : unit support -> 'a support;
}
type 'a binding = {
  1. feature : feature_info;
  2. level : 'a support;
  3. origin : origin;
}
type reason = [
  1. | `Used
  2. | `Ignored
  3. | `Archaic of origin
  4. | `Obsolete of origin
  5. | `Unconformable of origin
]
type usage = {
  1. loc : Cobol_common.srcloc;
  2. feature : feature_info;
  3. reason : reason;
}
type 'a verification = ('a * usage option, usage option) Stdlib.result