- if !l = [] then fail (lazy "No term to generalize");
- let goalty = get_goalty status goal in
- let canon = List.hd !l in
- let status =
+ let goalty = get_goalty status goal in
+ let status,canon,rest =
+ match !l with
+ [] ->
+ (match where with
+ _,_,(None,_,_) -> fail (lazy "No term to generalize")
+ | txt,txtlen,(Some what,_,_) ->
+ let status, what =
+ disambiguate status (txt,txtlen,what) None (ctx_of goalty)
+ in
+ status,what,[]
+ )
+ | he::tl -> status,he,tl in
+ let status =