Module Comp.Expression_object

type t =
  1. | Raw_identifier of {
    1. location : Beluga_syntax.Syncom.Location.t;
    2. identifier : Beluga_syntax.Syncom.Identifier.t;
    3. prefixed : Stdlib.Bool.t;
    }
  2. | Raw_qualified_identifier of {
    1. location : Beluga_syntax.Syncom.Location.t;
    2. identifier : Beluga_syntax.Syncom.Qualified_identifier.t;
    3. prefixed : Stdlib.Bool.t;
    }
    (*
    • Raw_qualified_identifier { identifier = "M.x"; prefixed = false; _ } is the constant "M.x".
    • Raw_qualified_identifier { identifier = "M.x"; prefixed = true; _ } is the prefixed constant "(M.x)".

    Since identifiers are ambiguous with qualified identifiers in the parser, the following may be assumed during disambiguation: List.length (Qualified_identifier.namespaces identifier) >= 1.

    Qualified identifiers are ambiguous with observations.

    A prefixed constant may appear as an argument, or as applicand in prefix notation irrespective of its pre-defined fixity and associativity.

    *)
  3. | Raw_fn of {
    1. location : Beluga_syntax.Syncom.Location.t;
    2. parameters : (Beluga_syntax.Syncom.Location.t * Beluga_syntax.Syncom.Identifier.t Support.Option.t) Support.List1.t;
    3. body : t;
    }
  4. | Raw_mlam of {
    1. location : Beluga_syntax.Syncom.Location.t;
    2. parameters : (Beluga_syntax.Syncom.Location.t * (Beluga_syntax.Syncom.Identifier.t Support.Option.t * [ `Plain | `Hash | `Dollar ])) Support.List1.t;
    3. body : t;
    }
  5. | Raw_fun of {
    1. location : Beluga_syntax.Syncom.Location.t;
    2. branches : (Synprs__.Synprs_definition.Meta.Context_object.t * Copattern_object.t Support.List1.t * t) Support.List1.t;
    }
  6. | Raw_box of {
    1. location : Beluga_syntax.Syncom.Location.t;
    2. meta_object : Synprs__.Synprs_definition.Meta.Thing.t;
    }
  7. | Raw_let of {
    1. location : Beluga_syntax.Syncom.Location.t;
    2. meta_context : Synprs__.Synprs_definition.Meta.Context_object.t;
    3. pattern : Pattern_object.t;
    4. scrutinee : t;
    5. body : t;
    }
  8. | Raw_impossible of {
    1. location : Beluga_syntax.Syncom.Location.t;
    2. scrutinee : t;
    }
  9. | Raw_case of {
    1. location : Beluga_syntax.Syncom.Location.t;
    2. scrutinee : t;
    3. check_coverage : Stdlib.Bool.t;
    4. branches : (Synprs__.Synprs_definition.Meta.Context_object.t * Pattern_object.t * t) Support.List1.t;
    }
  10. | Raw_tuple of {
    1. location : Beluga_syntax.Syncom.Location.t;
    2. elements : t Support.List2.t;
    }
  11. | Raw_hole of {
    1. location : Beluga_syntax.Syncom.Location.t;
    2. label : Beluga_syntax.Syncom.Identifier.t Support.Option.t;
    }
  12. | Raw_box_hole of {
    1. location : Beluga_syntax.Syncom.Location.t;
    }
  13. | Raw_application of {
    1. location : Beluga_syntax.Syncom.Location.t;
    2. expressions : t Support.List2.t;
    }
  14. | Raw_annotated of {
    1. location : Beluga_syntax.Syncom.Location.t;
    2. expression : t;
    3. typ : Sort_object.t;
    }
  15. | Raw_observation of {
    1. location : Beluga_syntax.Syncom.Location.t;
    2. scrutinee : t;
    3. destructor : Beluga_syntax.Syncom.Qualified_identifier.t;
    }
    (*

    Raw_observation { scrutinee = e; destructor = ".tl"; _ } is the observation e .tl.

    Because of the lexical convention, destructor may be multiple consecutive destructors. For instance, (x) .tl .tl has destructor = ".tl.tl".

    *)