FStarLang / steel

The Steel separation logic library for F*
Apache License 2.0
31 stars 5 forks source link

Recursive calls fail to infer #141

Closed nikswamy closed 10 months ago

nikswamy commented 11 months ago
fn rec loop (#t:Type0) (l:list t)
requires emp
ensures emp
{
  loop #t l;
}

Leaving out the #t produces the error:

prover-error: Ill-typed substitution
nikswamy commented 11 months ago

The recursively bound loop is introduced at an odd type. Notice that it takes a type parameter t' but the type of the second argument refers to the outer t#1.