X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fsoftware%2Fcomponents%2Fcontent_pres%2FtermContentPres.ml;h=bffd189761651095760df44d24edaee55633716f;hb=190c0efe22d097c4b4e85207342224622b1fccb9;hp=fd326e5e99413902675530d2da45f38c9d1d05f9;hpb=128ea02422e0cc4254ea3f8e4b0c5248c7182479;p=helm.git diff --git a/helm/software/components/content_pres/termContentPres.ml b/helm/software/components/content_pres/termContentPres.ml index fd326e5e9..bffd18976 100644 --- a/helm/software/components/content_pres/termContentPres.ml +++ b/helm/software/components/content_pres/termContentPres.ml @@ -319,7 +319,11 @@ let instantiate21 idrefs env l1 = assert (CicNotationEnv.well_typed ty value); (* INVARIANT *) (* following assertion should be a conditional that makes this * instantiation fail *) - assert (CicNotationEnv.well_typed expected_ty value); + if not (CicNotationEnv.well_typed expected_ty value) then + begin + prerr_endline ("The variable " ^ name ^ " is used with the wrong type in the notation declaration"); + assert false + end; let value = CicNotationEnv.term_of_value value in let value = match expected_ty with @@ -346,7 +350,7 @@ let instantiate21 idrefs env l1 = let sep = match sep_opt with | None -> [] - | Some l -> [ Ast.Literal l ] + | Some l -> [ Ast.Literal l; break; space ] in let rec instantiate_list acc = function | [] -> List.rev acc @@ -359,7 +363,8 @@ let instantiate21 idrefs env l1 = let terms = subst pos env p in instantiate_list (CicNotationUtil.group (terms @ sep) :: acc) tl in - instantiate_list [] values + if values = [] then [] + else [hovbox false false (instantiate_list [] values)] | Ast.Opt p -> let opt_decls = CicNotationEnv.declarations_of_term p in let env =