/// 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,
    metas: &meta::Env,
    term: &Rc<Term>,
) -> Result<UniverseLevel, TypeError> {
    let ty = synth_term(context, metas, term)?;
    match ty.as_ref() {
        Value::Universe(level) => Ok(*level),
        _ => Err(TypeError::ExpectedUniverse { found: ty.clone() }),
    }
}
pub fn synth_universe ( context : & Context , metas : & meta :: Env , term : & Rc < Term > , ) -> Result < UniverseLevel , TypeError > { let ty = synth_term ( context , metas , 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
metas
&meta::Env
term
&Rc<Term>