Open TDiazT opened 5 years ago
I changed the definition so I no longer do that with
clause over ty
in the nested where
clause and I no longer get the error message. I basically lifted that inner check to the with
clause over the baz
call :
If (ty := X1 | X2),
with baz t (qux hd _) :=
{
| Some X1 := ((qux hd _), nested_foo (quux t (qux hd _)))
:: foo t (filter some_predicate tl)
where nested_foo : option (A + B + list C) -> T4 :=
{
nested_foo (Some (inr vs)) := ... (map (fun ... => recursive_call_to_foo) vs); (* Removed with clause *)
nested_foo _ := ...
};
| Some X2 := ((qux hd _), nested_foo (quux t (qux hd _)))
:: foo t (filter some_predicate tl)
where nested_foo : option (A + B + list C) -> T4 :=
{
nested_foo ... := ... ;
nested_foo _ := ...
};
| _ := ... :: foo t (filter some_predicate tl)
}
I came up with this error :
I am not sure how to make a simple example replicating the issue :/ .. I have the following structure (more or less):
with
clause with nothing too fancy.with
clause with a nestedwhere
clause, in which there are somewith
clauses over some elements in context (ty
).