Change the annotation because exn:test is really an exn:fail (and not a direct sub-struct of exn).
The old annotation had a funny consequence for the type of test-begin. It has a predicate that checks for exn:fail structs that are not exn:fail:test structs. Here's the old code:
The funny consequence is that (exn:test? e) has type False because the typechecker thinks that exn:fail is distinct. And so, the whole old predicate boils down to exn:fail?.
With the new annotation, the predicate has an asymmetric occurrence type. That's why I had to add an ann there.
Change the annotation because
exn:test
is really anexn:fail
(and not a direct sub-struct ofexn
).The old annotation had a funny consequence for the type of
test-begin
. It has a predicate that checks forexn:fail
structs that are notexn:fail:test
structs. Here's the old code:The funny consequence is that
(exn:test? e)
has typeFalse
because the typechecker thinks thatexn:fail
is distinct. And so, the whole old predicate boils down toexn:fail?
.With the new annotation, the predicate has an asymmetric occurrence type. That's why I had to add an
ann
there.