Cic.Prod(name,s,t')
| t -> ProofEngineReduction.unfold context t
-let rec collapse_head_metas = function
- | Cic.Appl(a::l) ->
- let a' = collapse_head_metas a in
- (match a' with
- | Cic.Meta(n,m) -> Cic.Meta(n,m)
- | t ->
- let l' = List.map collapse_head_metas l in
- Cic.Appl(t::l'))
- | t -> t
+let rec collapse_head_metas t =
+ match t with
+ | Cic.Appl([]) -> assert false
+ | Cic.Appl(a::l) ->
+ let a' = collapse_head_metas a in
+ (match a' with
+ | Cic.Meta(n,m) -> Cic.Meta(n,m)
+ | t ->
+ let l' = List.map collapse_head_metas l in
+ Cic.Appl(t::l'))
+ | Cic.Rel _
+ | Cic.Var _
+ | Cic.Meta _
+ | Cic.Sort _
+ | Cic.Implicit _
+ | Cic.Const _
+ | Cic.MutInd _
+ | Cic.MutConstruct _ -> t
+ | Cic.LetIn _
+ | Cic.Lambda _
+ | Cic.Prod _
+ | Cic.Cast _
+ | Cic.MutCase _
+ | Cic.Fix _
+ | Cic.CoFix _ -> Cic.Meta(-1,[])
;;
let rec dummies_of_coercions =