fn check_kind(ctx: &Context, ty: &RcType, expected_kind: &RcKind) -> Result<(), KindError> {
    let found = infer_kind(ctx, ty)?;

    if &found == expected_kind {
        Ok(())
    } else {
        Err(KindError::Mismatch {
            span: ByteSpan::default(), // TODO: ty.span(),
            expected: expected_kind.clone(),
            found,
        })
    }
}
/// Check that a binary type has the given kind in the context
Check that a binary type has the given kind in the context
Check that a binary type has the given kind in the context
fn check_kind(ctx: &Context, ty: &RcType, expected_kind: &RcKind) -> Result<(), KindError> {
    let found = infer_kind(ctx, ty)?;
    if &found == expected_kind {
        Ok(())
    } else {
        Err(KindError::Mismatch {
            span: ByteSpan::default(), // TODO: ty.span(),
            expected: expected_kind.clone(),
            found,
        })
    }
}
fn check_kind ( ctx : & Context , ty : & RcType , expected_kind : & RcKind ) -> Result < ( ) , KindError > { let found = infer_kind ( ctx , ty ) ? ; if & found == expected_kind { Ok ( ( ) ) } else { Err ( KindError :: Mismatch { span : ByteSpan :: default ( ) , // TODO: ty.span(), expected : expected_kind . clone ( ) , found , } ) } }
Check that a binary type has the given kind in the context
Check that a binary type has the given kind in the context
ctx
&Context
ty
&RcType
expected_kind
&RcKind
ctx
&Context
ty
&RcType
expected_kind
&RcKind