fn synth_universe(
    context: &Context,
    concrete_term: &Term<'_>,
) -> Result<(core::RcTerm, UniverseLevel), Diagnostic<FileSpan>> {
    let (term, ty) = synth_term(context, concrete_term)?;
    match ty.as_ref() {
        domain::Value::Universe(level) => Ok((term, *level)),
        _ => Err(Diagnostic::new_error("type expected").with_label(
            DiagnosticLabel::new_primary(concrete_term.span())
                .with_message(format!("found `{}`", context.read_back(None, &ty)?)),
        )),
    }
}
/// Ensures that the given term is a universe, returning the level of that
/// universe and its elaborated form.
Ensures that the given term is a universe, returning the level of that
universe and its elaborated form.
Ensures that the given term is a universe returning the level of that universe and its elaborated form .
fn synth_universe(
    context: &Context,
    concrete_term: &Term<'_>,
) -> Result<(core::RcTerm, UniverseLevel), Diagnostic<FileSpan>> {
    let (term, ty) = synth_term(context, concrete_term)?;
    match ty.as_ref() {
        domain::Value::Universe(level) => Ok((term, *level)),
        _ => Err(Diagnostic::new_error("type expected").with_label(
            DiagnosticLabel::new_primary(concrete_term.span())
                .with_message(format!("found `{}`", context.read_back(None, &ty)?)),
        )),
    }
}
fn synth_universe ( context : & Context , concrete_term : & Term < ' _ > , ) -> Result < ( core :: RcTerm , UniverseLevel ) , Diagnostic < FileSpan > > { let ( term , ty ) = synth_term ( context , concrete_term ) ? ; match ty . as_ref ( ) { domain :: Value :: Universe ( level ) => Ok ( ( term , * level ) ) , _ => Err ( Diagnostic :: new_error ( " " ) . with_label ( DiagnosticLabel :: new_primary ( concrete_term . span ( ) ) . with_message ( format ! ( " " context read_back ( None ty ) ) ) , ) ) , } }
Ensures that the given term is a universe, returning the level of that
universe and its elaborated form.
Ensures that the given term is a universe returning the level of that universe and its elaborated form .
context
&Context
concrete_term
&Term<'_>