diff --git a/dag/gunbc/stage0/stage0_crate_layout_generated.dag b/dag/gunbc/stage0/stage0_crate_layout_generated.dag index bb28c3185f8..ae3ba2b1705 100644 --- a/dag/gunbc/stage0/stage0_crate_layout_generated.dag +++ b/dag/gunbc/stage0/stage0_crate_layout_generated.dag @@ -4,7 +4,7 @@ import std.types { List, String } data stage0_crate_layout_generated_note: String = "Generated by gunbc stage0_crate_layout_emit — do not hand-edit. Authority: v2.compiler.self_host.stage0_crate_layout; regen via dag/gunbc/instruments/generated_artifact_gate.dag main_wet." -data generated_pub_mod_block: String = "\n#[macro_use]\npub mod v1_interpreter_dispatch_generated;\npub mod gunbc_file_transport_generated;\npub mod v1_interpreter;\npub mod cli_run;\npub mod codex_app_server_stdio_session;\npub mod coproduct_reflection;\npub mod data_initializer_identity;\npub mod resolved_graph_cache;\npub mod shared_typecheck_store;\npub mod recorded_fixture;\npub mod derived_realization_schedule;\npub mod memory_governor;\npub mod module_path_index;\npub mod v2_compiler_body_producer;\npub mod v2_compiler_normalize;\npub mod v2_compiler_target_carriers;\npub mod v2_compiler_discovery_enumeration;\npub mod v2_compiler_parse_engine_hooks;\npub mod v2_compiler_use_site_verdict;\npub mod process_group;\npub mod v2_compiler_compile;\npub mod v2_compiler_program_assembly;\npub mod v2_compiler_source_authority;\npub mod std_logic;\npub mod usv_pilot_v2_std_algebra;\npub mod usv_pilot_v2_std_collection;\npub mod usv_pilot_v2_std_node;\npub mod v2_compiler_resolve;\npub mod v2_compiler_program_partition;\npub mod v2_compiler_tokenize;\npub mod v2_compiler_infer;\npub mod evaluation_budget_consequence_generated;" +data generated_pub_mod_block: String = "\n#[macro_use]\npub mod v1_interpreter_dispatch_generated;\npub mod gunbc_file_transport_generated;\npub mod v1_interpreter;\npub mod cli_run;\npub mod codex_app_server_stdio_session;\npub mod coproduct_reflection;\npub mod data_initializer_identity;\npub mod resolved_graph_cache;\npub mod shared_typecheck_store;\npub mod recorded_fixture;\npub mod derived_realization_schedule;\npub mod memory_governor;\npub mod module_path_index;\npub mod v2_compiler_body_producer;\npub mod v2_compiler_normalize;\npub mod v2_compiler_target_carriers;\npub mod v2_compiler_discovery_enumeration;\npub mod v2_compiler_parse_engine_hooks;\npub mod v2_compiler_use_site_verdict;\npub mod process_group;\npub mod v2_compiler_compile;\npub mod v2_compiler_program_assembly;\npub mod v2_compiler_source_authority;\npub mod std_logic;\npub mod usv_pilot_v2_std_algebra;\npub mod usv_pilot_v2_std_collection;\npub mod usv_pilot_v2_std_node;\npub mod v2_compiler_resolve;\npub mod v2_compiler_program_partition;\npub mod v2_compiler_tokenize;\npub mod v2_compiler_infer;\npub mod evaluation_budget_consequence_generated;\npub mod release_locus_seed_constants_generated;" data generated_pub_mod_basenames: List = [ "v1_interpreter", @@ -37,7 +37,8 @@ data generated_pub_mod_basenames: List = [ "v2_compiler_tokenize", "v2_compiler_infer", "evaluation_budget_consequence_generated", - "gunbc_file_transport_generated" + "gunbc_file_transport_generated", + "release_locus_seed_constants_generated" ] data generated_stage0_filenames: List = [ @@ -88,6 +89,7 @@ data generated_stage0_filenames: List = [ "v1_interpreter_dispatch_generated.rs", "evaluation_budget_consequence_generated.rs", "gunbc_file_transport_generated.rs", + "release_locus_seed_constants_generated.rs", "main.rs" ] diff --git a/src/v1/stage0/src/bootstrap_stage0_crate_layout_generated.rs b/src/v1/stage0/src/bootstrap_stage0_crate_layout_generated.rs index c5be55a3a9c..76ddf6b4903 100644 --- a/src/v1/stage0/src/bootstrap_stage0_crate_layout_generated.rs +++ b/src/v1/stage0/src/bootstrap_stage0_crate_layout_generated.rs @@ -50,6 +50,7 @@ pub const HAND_MAINTAINED_STAGE0_FILES: &[&str] = &[ "v1_interpreter_dispatch_generated.rs", "evaluation_budget_consequence_generated.rs", "gunbc_file_transport_generated.rs", + "release_locus_seed_constants_generated.rs", "main.rs" ]; diff --git a/src/v1/stage0/src/emitted_population.rs b/src/v1/stage0/src/emitted_population.rs index 4da63253737..eaf84f5393f 100644 --- a/src/v1/stage0/src/emitted_population.rs +++ b/src/v1/stage0/src/emitted_population.rs @@ -34,7 +34,9 @@ // src/gunbc_cli_dispatch_surface.rs // src/gunbc_namespace_reference_derived_closure_admission.rs // src/gunbc_reference_derived_candidate.rs +// src/gunbc_rust_crate_package_ident.rs // src/gunbc_rust_decl_type_overlay.rs +// src/gunbc_rust_emitted_edge.rs // src/gunbc_rust_source_type_bindings.rs // src/gunbc_stage0_crate_layout_generated.rs // src/gunbc_stage0_crate_partition_generated.rs diff --git a/src/v1/stage0/src/gunbc_stage0_crate_layout_generated.rs b/src/v1/stage0/src/gunbc_stage0_crate_layout_generated.rs index 4fdb815ef5a..14f041563b1 100644 --- a/src/v1/stage0/src/gunbc_stage0_crate_layout_generated.rs +++ b/src/v1/stage0/src/gunbc_stage0_crate_layout_generated.rs @@ -21,7 +21,7 @@ pub fn stage0_crate_layout_generated_note() -> String { pub fn generated_pub_mod_block() -> String { thread_local! { static CACHED: String = { - "\n#[macro_use]\npub mod v1_interpreter_dispatch_generated;\npub mod gunbc_file_transport_generated;\npub mod v1_interpreter;\npub mod cli_run;\npub mod codex_app_server_stdio_session;\npub mod coproduct_reflection;\npub mod data_initializer_identity;\npub mod resolved_graph_cache;\npub mod shared_typecheck_store;\npub mod recorded_fixture;\npub mod derived_realization_schedule;\npub mod memory_governor;\npub mod module_path_index;\npub mod v2_compiler_body_producer;\npub mod v2_compiler_normalize;\npub mod v2_compiler_target_carriers;\npub mod v2_compiler_discovery_enumeration;\npub mod v2_compiler_parse_engine_hooks;\npub mod v2_compiler_use_site_verdict;\npub mod process_group;\npub mod v2_compiler_compile;\npub mod v2_compiler_program_assembly;\npub mod v2_compiler_source_authority;\npub mod std_logic;\npub mod usv_pilot_v2_std_algebra;\npub mod usv_pilot_v2_std_collection;\npub mod usv_pilot_v2_std_node;\npub mod v2_compiler_resolve;\npub mod v2_compiler_program_partition;\npub mod v2_compiler_tokenize;\npub mod v2_compiler_infer;\npub mod evaluation_budget_consequence_generated;".to_string() + "\n#[macro_use]\npub mod v1_interpreter_dispatch_generated;\npub mod gunbc_file_transport_generated;\npub mod v1_interpreter;\npub mod cli_run;\npub mod codex_app_server_stdio_session;\npub mod coproduct_reflection;\npub mod data_initializer_identity;\npub mod resolved_graph_cache;\npub mod shared_typecheck_store;\npub mod recorded_fixture;\npub mod derived_realization_schedule;\npub mod memory_governor;\npub mod module_path_index;\npub mod v2_compiler_body_producer;\npub mod v2_compiler_normalize;\npub mod v2_compiler_target_carriers;\npub mod v2_compiler_discovery_enumeration;\npub mod v2_compiler_parse_engine_hooks;\npub mod v2_compiler_use_site_verdict;\npub mod process_group;\npub mod v2_compiler_compile;\npub mod v2_compiler_program_assembly;\npub mod v2_compiler_source_authority;\npub mod std_logic;\npub mod usv_pilot_v2_std_algebra;\npub mod usv_pilot_v2_std_collection;\npub mod usv_pilot_v2_std_node;\npub mod v2_compiler_resolve;\npub mod v2_compiler_program_partition;\npub mod v2_compiler_tokenize;\npub mod v2_compiler_infer;\npub mod evaluation_budget_consequence_generated;\npub mod release_locus_seed_constants_generated;".to_string() }; } CACHED.with(|c: &String| c.clone()) @@ -30,7 +30,7 @@ pub fn generated_pub_mod_block() -> String { pub fn generated_pub_mod_basenames() -> Rc> { thread_local! { static CACHED: Rc> = { - Rc::new(vec!["v1_interpreter".to_string(), "cli_run".to_string(), "codex_app_server_stdio_session".to_string(), "coproduct_reflection".to_string(), "data_initializer_identity".to_string(), "resolved_graph_cache".to_string(), "shared_typecheck_store".to_string(), "recorded_fixture".to_string(), "derived_realization_schedule".to_string(), "memory_governor".to_string(), "module_path_index".to_string(), "v2_compiler_body_producer".to_string(), "v2_compiler_normalize".to_string(), "v2_compiler_target_carriers".to_string(), "v2_compiler_discovery_enumeration".to_string(), "v2_compiler_parse_engine_hooks".to_string(), "v2_compiler_use_site_verdict".to_string(), "process_group".to_string(), "v2_compiler_compile".to_string(), "v2_compiler_program_assembly".to_string(), "v2_compiler_source_authority".to_string(), "std_logic".to_string(), "usv_pilot_v2_std_algebra".to_string(), "usv_pilot_v2_std_collection".to_string(), "usv_pilot_v2_std_node".to_string(), "v2_compiler_resolve".to_string(), "v2_compiler_program_partition".to_string(), "v2_compiler_tokenize".to_string(), "v2_compiler_infer".to_string(), "evaluation_budget_consequence_generated".to_string(), "gunbc_file_transport_generated".to_string()]) + Rc::new(vec!["v1_interpreter".to_string(), "cli_run".to_string(), "codex_app_server_stdio_session".to_string(), "coproduct_reflection".to_string(), "data_initializer_identity".to_string(), "resolved_graph_cache".to_string(), "shared_typecheck_store".to_string(), "recorded_fixture".to_string(), "derived_realization_schedule".to_string(), "memory_governor".to_string(), "module_path_index".to_string(), "v2_compiler_body_producer".to_string(), "v2_compiler_normalize".to_string(), "v2_compiler_target_carriers".to_string(), "v2_compiler_discovery_enumeration".to_string(), "v2_compiler_parse_engine_hooks".to_string(), "v2_compiler_use_site_verdict".to_string(), "process_group".to_string(), "v2_compiler_compile".to_string(), "v2_compiler_program_assembly".to_string(), "v2_compiler_source_authority".to_string(), "std_logic".to_string(), "usv_pilot_v2_std_algebra".to_string(), "usv_pilot_v2_std_collection".to_string(), "usv_pilot_v2_std_node".to_string(), "v2_compiler_resolve".to_string(), "v2_compiler_program_partition".to_string(), "v2_compiler_tokenize".to_string(), "v2_compiler_infer".to_string(), "evaluation_budget_consequence_generated".to_string(), "gunbc_file_transport_generated".to_string(), "release_locus_seed_constants_generated".to_string()]) }; } CACHED.with(|c: &Rc>| c.clone()) @@ -39,7 +39,7 @@ pub fn generated_pub_mod_basenames() -> Rc> { pub fn generated_stage0_filenames() -> Rc> { thread_local! { static CACHED: Rc> = { - Rc::new(vec!["v1_interpreter.rs".to_string(), "bounded_shell_host_drain.rs".to_string(), "cli_run.rs".to_string(), "codex_app_server_stdio_session.rs".to_string(), "coproduct_reflection.rs".to_string(), "data_initializer_identity.rs".to_string(), "declaration_index.rs".to_string(), "resolved_graph_cache.rs".to_string(), "shared_typecheck_store.rs".to_string(), "recorded_fixture.rs".to_string(), "phase_profile.rs".to_string(), "pre_push.rs".to_string(), "census_exclude_derive.rs".to_string(), "derived_realization_schedule.rs".to_string(), "memory_governor.rs".to_string(), "namespace_baseline.rs".to_string(), "v2_compiler_body_producer.rs".to_string(), "v2_compiler_normalize.rs".to_string(), "v2_compiler_target_carriers.rs".to_string(), "v2_compiler_discovery_enumeration.rs".to_string(), "v2_compiler_parse_engine_hooks.rs".to_string(), "v2_compiler_use_site_verdict.rs".to_string(), "cssl_seed_linked_closure_assembly.rs".to_string(), "required_regen_host.rs".to_string(), "target_invocation_host.rs".to_string(), "behavioral_receipt_host.rs".to_string(), "partition_crate_boundary_host.rs".to_string(), "generated_artifact_boundary_host.rs".to_string(), "emitted_closure_compile_host.rs".to_string(), "evaluation_budget_consequence_falsifier_host.rs".to_string(), "process_group.rs".to_string(), "v2_compiler_compile.rs".to_string(), "v2_compiler_program_assembly.rs".to_string(), "v2_compiler_source_authority.rs".to_string(), "std_logic.rs".to_string(), "usv_pilot_v2_std_algebra.rs".to_string(), "usv_pilot_v2_std_collection.rs".to_string(), "usv_pilot_v2_std_node.rs".to_string(), "v2_compiler_resolve.rs".to_string(), "v2_compiler_program_partition.rs".to_string(), "v2_compiler_tokenize.rs".to_string(), "v2_compiler_infer.rs".to_string(), "bootstrap_stage0_crate_layout_generated.rs".to_string(), "bootstrap_seed_retention_frontier_generated.rs".to_string(), "v1_interpreter_dispatch_generated.rs".to_string(), "evaluation_budget_consequence_generated.rs".to_string(), "gunbc_file_transport_generated.rs".to_string(), "main.rs".to_string()]) + Rc::new(vec!["v1_interpreter.rs".to_string(), "bounded_shell_host_drain.rs".to_string(), "cli_run.rs".to_string(), "codex_app_server_stdio_session.rs".to_string(), "coproduct_reflection.rs".to_string(), "data_initializer_identity.rs".to_string(), "declaration_index.rs".to_string(), "resolved_graph_cache.rs".to_string(), "shared_typecheck_store.rs".to_string(), "recorded_fixture.rs".to_string(), "phase_profile.rs".to_string(), "pre_push.rs".to_string(), "census_exclude_derive.rs".to_string(), "derived_realization_schedule.rs".to_string(), "memory_governor.rs".to_string(), "namespace_baseline.rs".to_string(), "v2_compiler_body_producer.rs".to_string(), "v2_compiler_normalize.rs".to_string(), "v2_compiler_target_carriers.rs".to_string(), "v2_compiler_discovery_enumeration.rs".to_string(), "v2_compiler_parse_engine_hooks.rs".to_string(), "v2_compiler_use_site_verdict.rs".to_string(), "cssl_seed_linked_closure_assembly.rs".to_string(), "required_regen_host.rs".to_string(), "target_invocation_host.rs".to_string(), "behavioral_receipt_host.rs".to_string(), "partition_crate_boundary_host.rs".to_string(), "generated_artifact_boundary_host.rs".to_string(), "emitted_closure_compile_host.rs".to_string(), "evaluation_budget_consequence_falsifier_host.rs".to_string(), "process_group.rs".to_string(), "v2_compiler_compile.rs".to_string(), "v2_compiler_program_assembly.rs".to_string(), "v2_compiler_source_authority.rs".to_string(), "std_logic.rs".to_string(), "usv_pilot_v2_std_algebra.rs".to_string(), "usv_pilot_v2_std_collection.rs".to_string(), "usv_pilot_v2_std_node.rs".to_string(), "v2_compiler_resolve.rs".to_string(), "v2_compiler_program_partition.rs".to_string(), "v2_compiler_tokenize.rs".to_string(), "v2_compiler_infer.rs".to_string(), "bootstrap_stage0_crate_layout_generated.rs".to_string(), "bootstrap_seed_retention_frontier_generated.rs".to_string(), "v1_interpreter_dispatch_generated.rs".to_string(), "evaluation_budget_consequence_generated.rs".to_string(), "gunbc_file_transport_generated.rs".to_string(), "release_locus_seed_constants_generated.rs".to_string(), "main.rs".to_string()]) }; } CACHED.with(|c: &Rc>| c.clone()) diff --git a/src/v1/stage0/src/std_integer.rs b/src/v1/stage0/src/std_integer.rs index fef2a300a29..8e0c6fe1427 100644 --- a/src/v1/stage0/src/std_integer.rs +++ b/src/v1/stage0/src/std_integer.rs @@ -8,7 +8,8 @@ use self::Signedness::*; use self::UInt8Result::*; pub use crate::std_algebra::{AbelianGroup, GroupCompletion}; pub use crate::std_induction::int_pow_bounded; -pub use crate::std_machine_constraints::{Compose, MachineWidth, PointerWidth}; +pub use crate::std_machine_constraints::PointerWidth; +pub use crate::std_machine_constraints::{Compose, MachineWidth}; pub use crate::std_measure::{bit_width, bit_width_count, bits_per_byte}; pub use crate::std_nat::Nat; use crate::v1_rt; diff --git a/src/v1/stage0/src/std_machine_constraints.rs b/src/v1/stage0/src/std_machine_constraints.rs index 1d45e61f12d..4c96ef7e32d 100644 --- a/src/v1/stage0/src/std_machine_constraints.rs +++ b/src/v1/stage0/src/std_machine_constraints.rs @@ -1,7 +1,12 @@ // Generated by v1 compiler -- do not edit. // Source module: std.machine_constraints +use self::WidthResolution::*; pub use crate::std_constructors::Phantom; +pub use crate::std_dissolution::unbound_dissolution; +pub use crate::std_dissolution::DissolutionCondition; +use crate::std_dissolution::DissolutionCondition::*; +pub use crate::std_types::NonEmptyStr; use crate::v1_rt; use crate::v1_rt::{VecCompat, VecJoin}; use crate::NonEmptyBTreeSet; @@ -9,13 +14,31 @@ use crate::NonEmptyVec; use im::{vector as vec, HashMap, OrdSet as BTreeSet, Vector as Vec}; use std::rc::Rc; -#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)] -pub struct PointerWidth(pub std::marker::PhantomData<()>); - -pub type WidthResolution = PointerWidth; +#[derive( + Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, serde::Serialize, serde::Deserialize, +)] +#[serde(tag = "_variant")] +pub enum WidthResolution { + StaticWidthIndex, + PointerWidth, +} #[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)] pub struct MachineWidth(pub std::marker::PhantomData); +pub fn machine_width_literal_roster_frontier() -> Rc { + thread_local! { + static CACHED: Rc = { + crate::std_dissolution::unbound_dissolution("Per-kind literal admissibility at a kinded type-argument position. A Nat literal is admitted by a language-level rule rather than by the kind's declared arms, so MachineWidth cannot express WHICH literals it admits and a nonsensical width typechecks exactly as a real one does. DISSOLVES ON a kind being able to declare its admissible literal domain -- SUFFICIENT FOR the wall to refuse a literal outside it at the same position and with the same located diagnostic it already gives a named non-inhabitant, so the literal and named halves reach one rung. Five carriers were tried and enumerated at this module's header; each fails because a literal is not a name, so admitting one needs a compiler-held convention mapping literals to an arm -- the stringly proxy this kind exists to remove. Not dissolved by adding an arm, and not by widening the wall to refuse every literal, which would refuse the four live MachineWidth sites the corpus writes as bare integers.".to_string()) + }; + } + CACHED.with(|c: &Rc| c.clone()) +} + pub type Compose = std::marker::PhantomData<(Algebra, MachineConstraint)>; + +#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)] +pub struct StaticWidthIndex; +#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)] +pub struct PointerWidth; diff --git a/src/v1/stage0/src/v1_compiler_emit_rust.rs b/src/v1/stage0/src/v1_compiler_emit_rust.rs index 955ecbfaa9e..be770f9f039 100644 --- a/src/v1/stage0/src/v1_compiler_emit_rust.rs +++ b/src/v1/stage0/src/v1_compiler_emit_rust.rs @@ -78,7 +78,6 @@ pub use crate::std_decl_ref::{DeclField, DeclarationRef}; use crate::std_induction::SubValueRelation::SubValueUnknown; pub use crate::std_induction::{InductiveField, SubValueRelation}; pub use crate::std_measure::millisecond_count; -pub use crate::std_measure::second; pub use crate::std_nat::Nat; pub use crate::std_occurrence_identity::NodeOccurrenceIdentity; use crate::std_occurrence_identity::NodeOccurrenceIdentity::OccurrenceSynthetic; @@ -120,7 +119,6 @@ pub use crate::std_target_representation::ExactBindingResolution; use crate::std_target_representation::ExactBindingResolution::{ ExactBindingAbsent, ExactBindingAmbiguous, ExactSourceIdentityUnavailable, ResolvedExactBinding, }; -pub use crate::std_types::NonEmptyStr; pub use crate::std_types::SourceSpan; pub use crate::std_types::{container_template_algebra, is_container_type, is_kernel_type}; use crate::v1_compiler_artifact::RenderTarget::Rust; @@ -130,7 +128,6 @@ use crate::v1_compiler_artifact::RustModuleRenderSelection::{ pub use crate::v1_compiler_artifact::{RenderTarget, RustModuleRenderSelection}; pub use crate::v1_compiler_closure_stub_v2_std_integer_rust::closure_stub_v2_std_integer_source; pub use crate::v1_compiler_closure_stub_v2_std_text_rust::closure_stub_v2_std_text_source; -pub use crate::v1_compiler_coercion::literal_suffix; pub use crate::v1_compiler_coercion::{ coerce_primitive_type, declaration_realization, declaration_realizes_natively_on_rust, is_copy, provenance_declares_structurally, realization_host_numeric_spelling, diff --git a/src/v1/stage0/src/v1_compiler_infer_resolve.rs b/src/v1/stage0/src/v1_compiler_infer_resolve.rs index 696cf3867bc..d2111cf2d86 100644 --- a/src/v1/stage0/src/v1_compiler_infer_resolve.rs +++ b/src/v1/stage0/src/v1_compiler_infer_resolve.rs @@ -102,7 +102,7 @@ pub fn type_param_kind_diagnostics( Some(arg) => { let kind_name = crate::v1_compiler_infer_env::authored_name(env.clone(), kind_node.clone()); let param_name = crate::v1_std_core::authored_name_at(env.source_indices.clone(), pair.1.clone()); -match type_arg_kind_inhabitance(arg.clone(), kind_node.clone(), env.clone()) { +match type_arg_kind_inhabitance(arg.clone(), kind_node.clone(), env.clone(), module_name.clone()) { KindInhabitance::KindInhabited => Rc::new(vec![]), KindInhabitance::KindNotInhabited => Rc::new(vec![crate::v1_std_core::make_error_node(Rc::new(CompilerDiagnostic::TypeArgumentKindMismatch { type_name: type_name.clone(), @@ -150,6 +150,7 @@ pub fn type_arg_kind_inhabitance( arg: Rc, kind_node: Rc, env: Rc, + module_name: String, ) -> KindInhabitance { { let arg_is_type_var = match arg.inferred.clone() { @@ -172,29 +173,44 @@ pub fn type_arg_kind_inhabitance( Some(kind_decl) => { let arg_name = crate::v1_compiler_infer_env::authored_name(env.clone(), arg.clone()); - // TRANSIENT BOOTSTRAP PATCH -- the same arm v1.compiler.infer_resolve now - // declares, carried into the seed by hand because this seed is what compiles - // the corpus that regen needs, and without it the kind check cannot read a - // coproduct kind's arms and refuses its own declared inhabitant. Replaced by - // generated bytes on the next regen; not the authority. - if kind_decl.children.iter().any(|c| { - node_authored_or_own_name(c.clone(), env.clone()) == arg_name.clone() - }) { - KindInhabitance::KindInhabited - } else if kind_names_admissible_inhabitant( - kind_decl.clone(), - arg_name.clone(), - env.clone(), - ) { + if { + let mut __found = false; + for c in kind_decl.children.clone().iter().cloned() { + if (node_authored_or_own_name(c.clone(), env.clone()) + == arg_name.clone()) + { + __found = true; + break; + } + } + __found + } { KindInhabitance::KindInhabited } else { - if type_arg_name_is_bound_generic_parameter( + if kind_names_admissible_inhabitant( + kind_decl.clone(), arg_name.clone(), env.clone(), ) { KindInhabitance::KindInhabited } else { - KindInhabitance::KindNotInhabited + if kind_inhabitant_matches_resolved( + kind_node.clone(), + arg.clone(), + env.clone(), + module_name.clone(), + ) { + KindInhabitance::KindInhabited + } else { + if type_arg_name_is_bound_generic_parameter( + arg_name.clone(), + env.clone(), + ) { + KindInhabitance::KindInhabited + } else { + KindInhabitance::KindNotInhabited + } + } } } } @@ -212,6 +228,32 @@ pub fn kind_names_admissible_inhabitant( (kind_admissible_inhabitant_name(kind_decl.clone(), env.clone()) == arg_name.clone()) } +pub fn kind_inhabitant_matches_resolved( + kind_node: Rc, + arg: Rc, + env: Rc, + module_name: String, +) -> bool { + { + let resolved_kind = resolve_node_bounded( + kind_node.clone(), + env.clone(), + module_name.clone(), + 0, + false, + ) + .resolved + .clone(); + let resolved_arg = + resolve_node_bounded(arg.clone(), env.clone(), module_name.clone(), 0, false) + .resolved + .clone(); + let kind_name = node_authored_or_own_name(resolved_kind.clone(), env.clone()); + let arg_name = node_authored_or_own_name(resolved_arg.clone(), env.clone()); + ((kind_name.clone() != "".to_string()) && (kind_name.clone() == arg_name.clone())) + } +} + pub fn kind_admissible_inhabitant_name(kind_decl: Rc, env: Rc) -> String { match kind_decl.inferred.clone().as_deref().cloned() { Some(InferredNode::Resolved { node: target, .. }) => { diff --git a/src/v2/compiler/self_host/stage0_crate_layout.dag b/src/v2/compiler/self_host/stage0_crate_layout.dag index 5030055afed..c7d53cb1119 100644 --- a/src/v2/compiler/self_host/stage0_crate_layout.dag +++ b/src/v2/compiler/self_host/stage0_crate_layout.dag @@ -392,12 +392,17 @@ type WetActuatorGeneratedRegistration { declaration_route: WetActuatorDeclarationRoute } +// release_locus_seed_constants_generated: #12011 committed this registry-generated seed file +// (authority gunbc.release_locus_seed_constants_emit, reached through main_wet) and hand-added its +// `pub mod` line to lib.rs without a row here, so the stage0 regen refused +// CommittedMirrorNoLongerEmitted on it and the emitted lib.rs omitted the line. data wet_actuator_generated_registrations: List = [ WetActuatorGeneratedRegistration { basename: "bootstrap_stage0_crate_layout_generated", declaration_route: PathIncluded }, WetActuatorGeneratedRegistration { basename: "bootstrap_seed_retention_frontier_generated", declaration_route: PathIncluded }, WetActuatorGeneratedRegistration { basename: "v1_interpreter_dispatch_generated", declaration_route: MacroUsePubModSpliced }, WetActuatorGeneratedRegistration { basename: "evaluation_budget_consequence_generated", declaration_route: PlainPubMod }, - WetActuatorGeneratedRegistration { basename: "gunbc_file_transport_generated", declaration_route: PlainPubMod } + WetActuatorGeneratedRegistration { basename: "gunbc_file_transport_generated", declaration_route: PlainPubMod }, + WetActuatorGeneratedRegistration { basename: "release_locus_seed_constants_generated", declaration_route: PlainPubMod } ] // THE CRATE EXPOSURE IS ITS OWN ENROLLMENT, and that is why this projection exists rather than the