Module Signature.Pragma

Signature pragmas for setting compilation parameters

Plain pragmas may be interspersed between signature declarations.

type t =
  1. | Name of {
    1. location : Syncom.Location.t;
    2. constant : Syncom.Qualified_identifier.t;
    3. meta_variable_base : Syncom.Identifier.t;
    4. computation_variable_base : Syncom.Identifier.t Support.Option.t;
    }
    (*

    Name { constant = c; meta_variable_base = u; computation_variable_base = Option.Some x; _ } is the pragma --name c u x. for configuring the name-generation settings for meta-variables and computation-level variables generated for objects of type c.

    *)
  2. | Default_associativity of {
    1. location : Syncom.Location.t;
    2. associativity : Syncom.Associativity.t;
    }
    (*

    Default_associativity { associativity; _ } is the pragma --assoc <associativity>. where <associativity> is either left, right or none. This pragma assigns the default associativity for infix constants declared afterwards.

    *)
  3. | Prefix_fixity of {
    1. location : Syncom.Location.t;
    2. constant : Syncom.Qualified_identifier.t;
    3. precedence : Support.Int.t Support.Option.t;
    4. postponed : Stdlib.Bool.t;
    }
    (*

    Prefix_fixity { constant = c; precedence; postponed; _ } is the pragma --prefix c precedence. for configuring the constant c to be parsed as a prefix operator with precedence.

    If a precedence is already assigned to c, and precedence = Option.None, then the pre-existing precedence is used.

    If postponed = false, then the pragma is attached to a constant declared earlier than the pragma. Otherwise, when postponed = true, then the pragma is attached to a constant declared immediately after the pragma.

    *)
  4. | Infix_fixity of {
    1. location : Syncom.Location.t;
    2. constant : Syncom.Qualified_identifier.t;
    3. precedence : Support.Int.t Support.Option.t;
    4. associativity : Syncom.Associativity.t Support.Option.t;
    5. postponed : Stdlib.Bool.t;
    }
    (*

    Infix_fixity { constant = c; precedence; associativity; postponed; _ } is the pragma --infix c precedence associativity. for configuring the constant c to be parsed as an infix operator with precedence and associativity.

    • If a precedence is already assigned to c, and precedence = Option.None, then the pre-existing precedence is used.
    • If associativity = Option.None, then the associativity defaults to the associativity configured by the --default_associativity assoc. pragma, or Associativity.Non_associative if that pragma was never used.

    If postponed = false, then the pragma is attached to a constant declared earlier than the pragma. Otherwise, when postponed = true, then the pragma is attached to a constant declared immediately after the pragma.

    *)
  5. | Postfix_fixity of {
    1. location : Syncom.Location.t;
    2. constant : Syncom.Qualified_identifier.t;
    3. precedence : Support.Int.t Support.Option.t;
    4. postponed : Stdlib.Bool.t;
    }
    (*

    Postfix_fixity { constant = c; precedence; postponed; _ } is the pragma --postfix c precedence. for configuring the constant c to be parsed as a postfix operator with precedence.

    If a precedence is already assigned to c, and precedence = Option.None, then the pre-existing precedence is used.

    If postponed = false, then the pragma is attached to a constant declared earlier than the pragma. Otherwise, when postponed = true, then the pragma is attached to a constant declared immediately after the pragma.

    *)
  6. | Not of {
    1. location : Syncom.Location.t;
    }
    (*

    Not _ is the pragma --not which asserts that the declaration that follows it fails reconstruction.

    *)
  7. | Open_module of {
    1. location : Syncom.Location.t;
    2. module_identifier : Syncom.Qualified_identifier.t;
    }
    (*

    Open { module_identifier; _ } is the pragma --open module_identifier. for opening the module module_identifier, which adds its values to the current scope.

    *)
  8. | Abbreviation of {
    1. location : Syncom.Location.t;
    2. module_identifier : Syncom.Qualified_identifier.t;
    3. abbreviation : Syncom.Identifier.t;
    }
    (*

    Abbreviation { module_identifier; abbreviation; _ } is the pragma --abbrev module_identifier abbreviation. for defining the alias abbreviation for the module module_identifier.

    *)
  9. | Query of {
    1. location : Syncom.Location.t;
    2. identifier : Syncom.Identifier.t Support.Option.t;
    3. typ : Synext__.Synext_definition.LF.Typ.t;
    4. expected_solutions : Support.Int.t Support.Option.t;
    5. maximum_tries : Support.Int.t Support.Option.t;
    }
    (*

    Logic programming query on an LF type

    *)