Skip to main content

yulang_monomorphize/
lib.rs

1//! Runtime finalization for Yulang.
2//!
3//! The active rewrite starts from a fresh type graph.  A polymorphic principal
4//! type is first instantiated into that graph, then expression evidence is
5//! collected as lower/upper bounds.  Solving prefers lower bounds and returns a
6//! fully materializable monomorphic view of the graph.
7
8mod cache;
9mod diagnostic;
10mod graph;
11mod output;
12mod solver;
13
14pub use cache::{
15    CachedMonomorphizeInstance, MONOMORPHIZE_INSTANCE_CACHE_FORMAT_VERSION,
16    MonomorphizeInstanceArtifactCache, MonomorphizeInstanceArtifactCacheError,
17    MonomorphizeInstanceArtifactCacheKey, MonomorphizeInstanceCache,
18    MonomorphizeInstanceCachePolicy, MonomorphizeInstanceCacheProfile,
19    MonomorphizeInstanceCacheSurface, MonomorphizeInstanceKey,
20};
21pub use diagnostic::{MonomorphizeDiagnostic, MonomorphizeError, MonomorphizeResult};
22pub use graph::ResolvedTypeVar;
23pub use graph::{
24    GraphSolution, PrincipalInstance, PrincipalTypeParam, RuntimeBounds, TypeGraph, TypeVarBounds,
25    materialize_core_type, materialize_runtime_type,
26};
27pub use output::{
28    MonomorphizeOutput, MonomorphizeReport, RootGraphInput, RootGraphRoot, RootGraphSolution,
29};
30pub use solver::{
31    collect_root_graph_inputs, finalize_module, finalize_module_with_cache, monomorphize_module,
32    monomorphize_module_with_report, monomorphize_to_legacy_runtime_module,
33};