import Data.Fin
%default total
oops : Fin 0
oops = (-1)
boom : Void
boom = uninhabited oops
Expected Behavior
Fails to typecheck.
Observed Behavior
Compiler happy.
The reason is an unhealthy use of believe_me in the implementation of Data.Fin.fromInteger. The fix should not be too hard, so I'll try to come up with a PR soonish.
This was found by one of my students:
Steps to Reproduce
Typecheck the folloing:
Expected Behavior
Fails to typecheck.
Observed Behavior
Compiler happy.
The reason is an unhealthy use of
believe_me
in the implementation ofData.Fin.fromInteger
. The fix should not be too hard, so I'll try to come up with a PR soonish.