Open catalin-hritcu opened 8 years ago
This is as bad as before, in fact one of the things that worked (f2
) now started to fail too. On the positive side, one of the explosions become a spurious error. Updated the error messages above.
Discussed a bit with Nik about this and he thinks that some of the last examples (f3
and f4
) are quite hopeless for the way we currently type-check match
, by adding equality constraints and handing it to the SMT solver, since in this case the normalizer can't do its thing on the types. He's wondering whether it's time for a match
-as
-in
-return
variant like in Coq that one could use in such cases.
Only hopeless without annotations. With explicit ascriptions in the branches, it should be made to work. E.g. (fun n -> n) <: t false
Whether that's more palatable that the match-return syntax remains to be seen
f0
, f1
and f2
now work. The situation is the same for f3
and f4
(they work with annotations).
I'm encountering strange failures with computed function types in stlc-norm (https://github.com/yforster/stlc-norm/blob/master/StlcNormalizing.fst#L277) and since I was a bit stuck there (now not any more) I wanted to try if computed function types work in much simpler examples, and the results are quite mixed, including one
Unexpected error
and some regular failures too.