fn synth_clause_body(
    context: &Context,
    clause: &Clause<'_>,
) -> Result<(core::RcTerm, domain::RcType), Diagnostic<FileSpan>> {
    match clause.concrete_body_ty {
        None => synth_term(context, clause.concrete_body),
        Some(concrete_body_ty) => {
            let (body_ty, _) = synth_universe(context, concrete_body_ty)?;
            let body_ty = context.eval(concrete_body_ty.span(), &body_ty)?;
            let body = check_term(context, clause.concrete_body, &body_ty)?;
            Ok((body, body_ty))
        },
    }
}
/// Synthesize the type of the body of a clause, and elaborate it.
Synthesize the type of the body of a clause, and elaborate it.
Synthesize the type of the body of a clause and elaborate it .
fn synth_clause_body(
    context: &Context,
    clause: &Clause<'_>,
) -> Result<(core::RcTerm, domain::RcType), Diagnostic<FileSpan>> {
    match clause.concrete_body_ty {
        None => synth_term(context, clause.concrete_body),
        Some(concrete_body_ty) => {
            let (body_ty, _) = synth_universe(context, concrete_body_ty)?;
            let body_ty = context.eval(concrete_body_ty.span(), &body_ty)?;
            let body = check_term(context, clause.concrete_body, &body_ty)?;
            Ok((body, body_ty))
        },
    }
}
fn synth_clause_body ( context : & Context , clause : & Clause < ' _ > , ) -> Result < ( core :: RcTerm , domain :: RcType ) , Diagnostic < FileSpan > > { match clause . concrete_body_ty { None => synth_term ( context , clause . concrete_body ) , Some ( concrete_body_ty ) => { let ( body_ty , _ ) = synth_universe ( context , concrete_body_ty ) ? ; let body_ty = context . eval ( concrete_body_ty . span ( ) , & body_ty ) ? ; let body = check_term ( context , clause . concrete_body , & body_ty ) ? ; Ok ( ( body , body_ty ) ) } , } }
Synthesize the type of the body of a clause, and elaborate it.
Synthesize the type of the body of a clause and elaborate it .
context
&Context
clause
&Clause<'_>