extract_concrete_types

Function extract_concrete_types 

Source
pub fn extract_concrete_types(stack: &StackType) -> Vec<Type>
Expand description

Extract concrete types from a stack type (bottom to top order)

This function traverses a StackType and returns a vector of concrete types in bottom-to-top order (deepest stack element first).

§Example

Input: Cons { rest: Cons { rest: Empty, top: Int }, top: String }
Output: [Int, String]  (bottom to top)

§Row Variables

Row variables (like ..a) are skipped - this function only extracts concrete types. This is appropriate for capture analysis where we need to know the actual types being captured.

§Performance

Uses recursion to build the vector in the correct order without needing to clone the entire stack structure or reverse the result.