Skip to main content

extract_io_from_spec

Function extract_io_from_spec 

Source
pub fn extract_io_from_spec(
    spec_type: &Term,
) -> (Vec<(String, Term)>, Option<Term>)
Expand description

Extract input/output signal types from a kernel spec type.

Walks Pi binders to find input names and types. The final non-Pi type is the output type.

Example: Pi(a:Bit). Pi(b:Bit). Bit → inputs=[(a,Bit),(b,Bit)], output=Some(Bit)