////// Functions for reflecting on the runtime representation of values and types.///pubmod Reflect {import java.lang.{Object => JObject}////// Returns a default value for the inferred type./// The value returned should not be depended on;/// it acts as a placeholder to be replaced by a proper value.///pubdefdefault(): a = matchReflect.reflectType((Proxy.Proxy: Proxy[a])) {case JvmType.JvmBool => unchecked_cast(falseasa)case JvmType.JvmChar => unchecked_cast('0'asa)case JvmType.JvmFloat32 => unchecked_cast(0.0f32asa)case JvmType.JvmFloat64 => unchecked_cast(0.0f64asa)case JvmType.JvmInt8 => unchecked_cast(0i8asa)case JvmType.JvmInt16 => unchecked_cast(0i16asa)case JvmType.JvmInt32 => unchecked_cast(0i32asa)case JvmType.JvmInt64 => unchecked_cast(0i64asa)case JvmType.JvmObject => unchecked_cast(nullasa) }////// Type of reflected values, reflecting their erased runtime representation.///pubenumJvmValue {case JvmBool(Bool)case JvmChar(Char)case JvmInt8(Int8)case JvmInt16(Int16)case JvmInt32(Int32)case JvmInt64(Int64)case JvmFloat32(Float32)case JvmFloat64(Float64)case JvmObject(JObject) }/// Returns the purity of `ef`.pubdefreflectEff(p: ProxyEff[ef]): Purity = %%REFLECT_EFF%%(p)/// Returns the erased runtime representation of `x`.pubdefreflectValue(x: t): JvmValue = %%REFLECT_VALUE%%(x)/// Returns the erased runtime representation of `t`.pubdefreflectType(x: Proxy[t]): JvmType = %%REFLECT_TYPE%%(x)////// Type of reflected types, reflecting their erased runtime representation.///pubenumJvmType {case JvmBoolcase JvmCharcase JvmInt8case JvmInt16case JvmInt32case JvmInt64case JvmFloat32case JvmFloat64case JvmObject }////// Type of reflected effects.////// A reflected effect is either `Pure` (no effects) or `Impure` (some effects).///pubenumPurity {case Purecase Impure }////// Type of zero-width positions within a source.////// A position is identified by line and column coordinates.////// Both line and column numbers use one-based indexing./// (e.g., the first character of a source is at line 1, column 1).////// Fields:////// 1. `line`: The line number (1-based). Must be >= 1./// 2. `column`: The column number (1-based) within the specified line. Must be >= 1.///pubenumSourcePositionwithCoerce {case SourcePosition(Int32, Int32) }////// Type of spans within a source.////// A span is defined by a source identifier and start/end source positions.////// Fields:////// 1. `source`: The source identifier (typically a file path)/// 2. `start`: The beginning position of the span (inclusive)/// 3. `end`: The ending position of the span (inclusive)///pubenumSourceLocationwithCoerce {case SourceLocation(String, SourcePosition, SourcePosition) }////// Creates a `SourceLocation` from a source identifier and raw line/column coordinates.////// Returns a `SourceLocation` spanning from (`line1`, `col1`) to (`line2`, `col2`) in the given source.///pubdefmkSourceLocation(source: String, line1: Int32, col1: Int32, line2: Int32, col2: Int32): SourceLocation =use SourceLocation.SourceLocation;use SourcePosition.SourcePosition; SourceLocation(source, SourcePosition(line1, col1), SourcePosition(line2, col2) )}