CLF.ObjectContextual LF types, terms and patterns blurred together.
type t = | Raw_identifier of {location : Beluga_syntax.Syncom.Location.t;identifier : Beluga_syntax.Syncom.Identifier.t * [ `Plain | `Hash | `Dollar ];prefixed : Stdlib.Bool.t;}Raw_identifier { identifier = "$x"; modifier = `Dollar; _ } is the substitution variable "$x".Raw_identifier { identifier = "#x"; modifier = `Hash; _ } is the parameter variable "#x".Raw_identifier { identifier = "x"; prefixed = false; _ } is the variable or constant "x".Raw_identifier { identifier = "x"; prefixed = true; _ } is the prefixed variable or constant "(x)".A prefixed constant may appear as an argument, or as applicand in prefix notation irrespective of its pre-defined fixity and associativity.
*)| Raw_qualified_identifier of {location : Beluga_syntax.Syncom.Location.t;identifier : Beluga_syntax.Syncom.Qualified_identifier.t;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 named projections.
A prefixed constant may appear as an argument, or as applicand in prefix notation irrespective of its pre-defined fixity and associativity.
*)| Raw_hole of {location : Beluga_syntax.Syncom.Location.t;variant : [ `Underscore
| `Unlabelled
| `Labelled of Beluga_syntax.Syncom.Identifier.t ];}| Raw_pi of {location : Beluga_syntax.Syncom.Location.t;parameter_identifier : Beluga_syntax.Syncom.Identifier.t Support.Option.t;parameter_sort : t Support.Option.t;plicity : Beluga_syntax.Syncom.Plicity.t;body : t;}Raw_pi { parameter_identifier = Option.Some "x"; parameter_sort = Option.Some t; body; _ } is the Pi kind or type { x : t } body.
It is a syntax error to omit the parameter sort. Implicit Pis currently do not have a corresponding syntax, but it may be added in the future.
*)| Raw_lambda of {location : Beluga_syntax.Syncom.Location.t;parameter_identifier : Beluga_syntax.Syncom.Identifier.t Support.Option.t;parameter_sort : t Support.Option.t;body : t;}| Raw_arrow of {location : Beluga_syntax.Syncom.Location.t;domain : t;range : t;orientation : [ `Forward | `Backward ];}| Raw_annotated of {location : Beluga_syntax.Syncom.Location.t;object_ : t;sort : t;}| Raw_application of {location : Beluga_syntax.Syncom.Location.t;objects : t Support.List2.t;}Raw_application { objects; _ } is the juxtaposition of objects delimited by whitespaces. objects may contain prefix, infix or postfix operators, along with operands. These are rewritten during the disambiguation to the external syntax.
| Raw_block of {location : Beluga_syntax.Syncom.Location.t;elements : (Beluga_syntax.Syncom.Identifier.t Support.Option.t * t)
Support.List1.t;}| Raw_tuple of {location : Beluga_syntax.Syncom.Location.t;elements : t Support.List1.t;}| Raw_projection of {location : Beluga_syntax.Syncom.Location.t;object_ : t;projection : [ `By_identifier of Beluga_syntax.Syncom.Identifier.t
| `By_position of Support.Int.t ];}| Raw_substitution of {location : Beluga_syntax.Syncom.Location.t;object_ : t;substitution : Context_object.t;}