exception ReferenceToConstant;;
exception ReferenceToCurrentProof;;
exception ReferenceToInductiveDefinition;;
+exception DeliftingWouldCaptureAFreeVariable;;
let debug_print = fun _ -> ()
if m < k then
C.Rel m
else if m < k + n then
- (failwith "delifting this term whould capture free variables")
+ raise DeliftingWouldCaptureAFreeVariable
else
C.Rel (m - n)
| C.Var (uri,exp_named_subst) ->
in
candidate_oty,ugraph,metasenv,subst
with
- Failure _
+ CicSubstitution.DeliftingWouldCaptureAFreeVariable
| CicUnification.UnificationFailure _
| CicUnification.Uncertain _ ->
None,ugraph,metasenv,subst
Some
(add_lambdas 0 t arity_instantiated_with_left_args),
ugraph,metasenv,subst
- with Failure s ->
+ with CicSubstitution.DeliftingWouldCaptureAFreeVariable ->
None,ugraph4,metasenv,subst
in
match candidate with