Enumerations

The following enumerations are available globally.

  • An item in the condition of a conditional expression, match expression, or while loop.

    See more

    Declaration

    Swift

    public enum ConditionItem : Codable, Sendable
  • The body of a function or subscript implementation.

    See more

    Declaration

    Swift

    public enum FunctionBody : Codable, Sendable
  • An access modifier.

    See more

    Declaration

    Swift

    public enum AccessModifier : Codable, Sendable
  • A member modifier.

    See more

    Declaration

    Swift

    public enum MemberModifier : Codable, Sendable
  • A sequence of binary operations stored as a tree whose structure encodes the evaluation order.

    Instances of this type are created during type checking for each SequenceExpr in the program once the precedence groups of its operators have been determined. A tree is created by calling append(operator:right:) to append an operator and its right operand to the sub-sequence represented by self.

    See more

    Declaration

    Swift

    public indirect enum FoldedSequenceExpr : Hashable, Sendable
    extension FoldedSequenceExpr: Monotonic
  • The identity of a call expression.

    See more

    Declaration

    Swift

    public enum CallID : Hashable, Sendable
  • An operator notation.

    See more

    Declaration

    Swift

    public enum OperatorNotation : UInt8, Codable, Sendable
  • An operator precedence group.

    See more

    Declaration

    Swift

    public enum PrecedenceGroup : String, Codable, Sendable
    extension PrecedenceGroup: Comparable
  • An access effect, specifying how a parameter, receiver, or remote part is accessed.

    See more

    Declaration

    Swift

    public enum AccessEffect : UInt8, Codable, Sendable
    extension AccessEffect: Comparable
  • A function in the Builtin module, accessible only to the standard library.

    Built-in functions implement the basis operations on built-in types such as Builtin.i64, and are implemented by a single IR instruction.

    Only a few built-in functions, such as Builtin.address(of:), are truly generic. Others are parameterized by a bounded selection of types and flags, resulting in a family of related non-generic Hylo functions having the same base name. The full name of these functions is a concatenation of the base name with a representation of the value of each parameter, separated by underscores. For example, Builtin.add_i32 and Builtin.add_i64 represent integer addition for 32-bit and 64-bit integer values. Some flags have default values (e.g. OverflowBehavior.ignored), which are omitted from builtin function names. For example:

    Hylo spelling Swift representation
    Builtin.add_i64 .add(.ignored, .i(64))
    Builtin.icmp_ne_i32 .icmp(.ne, .i(32))
    Builtin.fmul_fast_float64 .fmul(.fast, .float64)

    Most built-in functions have the same semantics an the LLVM instruction with the same base name; the other cases have documentation describing their semantics and Hylo signature. Supported LLVM operations include all arithmetic and comparison instructions on built-in integral and floating-point numbers as well as conversions from and to these types.

    See more

    Declaration

    Swift

    public enum BuiltinFunction : Hashable, Sendable
    extension BuiltinFunction: CustomStringConvertible
  • A value computed at compile-time.

    See more

    Declaration

    Swift

    public enum CompileTimeValue : Hashable, Sendable
    extension CompileTimeValue: CustomStringConvertible
  • A reference to a declaration.

    See more

    Declaration

    Swift

    public enum DeclReference : Hashable, Sendable
    extension DeclReference: Monotonic
  • The predicate of an integer comparison.

    Note

    Ordered means that neither operand is a QNAN while unordered means that either operand may be a QNAN.
    See more

    Declaration

    Swift

    public enum FloatingPointPredicate : String, Hashable, Sendable
    extension FloatingPointPredicate: LosslessStringConvertible
  • The predicate of an integer comparison.

    See more

    Declaration

    Swift

    public enum IntegerPredicate : String, Hashable, Sendable
    extension IntegerPredicate: LosslessStringConvertible
  • The result of overflow during mathematical operations.

    See more

    Declaration

    Swift

    public enum OverflowBehavior : Sendable
  • Notes:

    Be careful when writing rules that start with an optional symbol that may be recognized at the beginning of the following construct. A naive combinator may not be able to backtrack. For example:

    let p0 = maybe(foo.and(bar)).and(ham)
    let p1 = foo.and(bar).or(ham)
    

    Both p0 and p1 will fail to recognize inputs recognized by ham if foo can recognize the same prefix, as the latter will throw a committing failure it applies bar rather than backtracking. A correct definition is:

    let p2 = attempt(foo.and(bar)).or(foo)
    

    A namespace for the routines of Hylo’s parser.

    See more

    Declaration

    Swift

    public enum Parser : Sendable
  • The body of a function or method declaration.

    See more

    Declaration

    Swift

    enum FunctionOrMethodDeclBody
  • A conjunction (&&) or disjunction (||) operator.

    See more

    Declaration

    Swift

    enum Connective : Int
  • Information identifying a run-time argument of a function or subscript call.

    See more

    Declaration

    Swift

    public enum ArgumentResolutionResult : Hashable, Monotonic
  • How a binding declaration is being used.

    See more

    Declaration

    Swift

    enum BindingDeclUse : Hashable
  • The kind of a callable entity.

    See more

    Declaration

    Swift

    enum CallableEntity : Sendable
  • The outcome of a goal.

    See more

    Declaration

    Swift

    private enum Outcome
  • The result of a name resolution request.

    See more

    Declaration

    Swift

    enum NameResolutionResult : Sendable
  • How a name expression is being used.

    See more

    Declaration

    Swift

    enum NameUse : Hashable
  • A part of a term in a requirement rewriting system.

    See more

    Declaration

    Swift

    enum RequirementSymbol : Hashable
  • A built-in type.

    See more

    Declaration

    Swift

    public enum BuiltinType : TypeProtocol
    extension BuiltinType: CustomStringConvertible
    extension BuiltinType: LosslessStringConvertible
  • The result of a call to a closure passed to TypeProtocol.transform(_:).

    See more

    Declaration

    Swift

    public enum TypeTransformAction : Sendable