pub fn synth_universe(context: &Context, term: &RcTerm) -> Result<UniverseLevel, TypeError> {
    let ty = synth_term(context, term)?;
    match ty.as_ref() {
        Value::Universe(level) => Ok(*level),
        _ => Err(TypeError::ExpectedUniverse { found: ty.clone() }),
    }
}
/// Ensures that the given term is a universe, returning the level of that universe.
Ensures that the given term is a universe, returning the level of that universe.
Ensures that the given term is a universe returning the level of that universe .
pub fn synth_universe(context: &Context, term: &RcTerm) -> Result<UniverseLevel, TypeError> {
    let ty = synth_term(context, term)?;
    match ty.as_ref() {
        Value::Universe(level) => Ok(*level),
        _ => Err(TypeError::ExpectedUniverse { found: ty.clone() }),
    }
}
pub fn synth_universe ( context : & Context , term : & RcTerm ) -> Result < UniverseLevel , TypeError > { let ty = synth_term ( context , term ) ? ; match ty . as_ref ( ) { Value :: Universe ( level ) => Ok ( * level ) , _ => Err ( TypeError :: ExpectedUniverse { found : ty . clone ( ) } ) , } }
Ensures that the given term is a universe, returning the level of that universe.
Ensures that the given term is a universe returning the level of that universe .
context
&Context
term
&RcTerm