src/HOL/Tools/Lifting/lifting_setup.ML
changeset 70322 65b880d4efbb
parent 70321 24877d539fb8
child 70473 9179e7a98196
equal deleted inserted replaced
70321:24877d539fb8 70322:65b880d4efbb
   560       in
   560       in
   561          notes2 @ notes1 @ notes
   561          notes2 @ notes1 @ notes
   562       end
   562       end
   563 
   563 
   564     fun generate_parametric_rel_eq ctxt transfer_rule opt_param_thm =
   564     fun generate_parametric_rel_eq ctxt transfer_rule opt_param_thm =
   565       option_fold transfer_rule
   565       (case opt_param_thm of
   566         (Lifting_Def.generate_parametric_transfer_rule ctxt transfer_rule) opt_param_thm
   566         NONE => transfer_rule
   567       handle Lifting_Term.MERGE_TRANSFER_REL msg =>
   567       | SOME param_thm =>
   568         error (cat_lines
   568           (Lifting_Def.generate_parametric_transfer_rule ctxt transfer_rule param_thm
   569           ["Generation of a parametric transfer rule for the quotient relation failed.",
   569             handle Lifting_Term.MERGE_TRANSFER_REL msg =>
   570           (Pretty.string_of (Pretty.block [Pretty.str "Reason:", Pretty.brk 2, msg]))])
   570               error ("Generation of a parametric transfer rule for the quotient relation failed:\n"
       
   571                 ^ Pretty.string_of msg)))
   571 
   572 
   572     fun setup_transfer_rules_par ctxt notes =
   573     fun setup_transfer_rules_par ctxt notes =
   573       let
   574       let
   574         val pcrel_info = the (get_pcrel_info ctxt qty_full_name)
   575         val pcrel_info = the (get_pcrel_info ctxt qty_full_name)
   575         val pcrel_def = #pcrel_def pcrel_info
   576         val pcrel_def = #pcrel_def pcrel_info