src/Tools/nbe.ML
changeset 59058 a78612c67ec0
parent 58397 1c036d6216d3
child 59151 a012574b78e7
equal deleted inserted replaced
59057:5b649fb2f2e1 59058:a78612c67ec0
    62     val _ = if Term.add_tvars eqn [] = [tvar] then ()
    62     val _ = if Term.add_tvars eqn [] = [tvar] then ()
    63       else error ("Inconsistent type: " ^ Display.string_of_thm_global thy thm);
    63       else error ("Inconsistent type: " ^ Display.string_of_thm_global thy thm);
    64     val lhs_rhs = case try Logic.dest_equals eqn
    64     val lhs_rhs = case try Logic.dest_equals eqn
    65      of SOME lhs_rhs => lhs_rhs
    65      of SOME lhs_rhs => lhs_rhs
    66       | _ => error ("Not an equation: " ^ Syntax.string_of_term_global thy eqn);
    66       | _ => error ("Not an equation: " ^ Syntax.string_of_term_global thy eqn);
    67     val c_c' = case try (pairself (Axclass.unoverload_const thy o dest_Const)) lhs_rhs
    67     val c_c' = case try (apply2 (Axclass.unoverload_const thy o dest_Const)) lhs_rhs
    68      of SOME c_c' => c_c'
    68      of SOME c_c' => c_c'
    69       | _ => error ("Not an equation with two constants: "
    69       | _ => error ("Not an equation with two constants: "
    70           ^ Syntax.string_of_term_global thy eqn);
    70           ^ Syntax.string_of_term_global thy eqn);
    71     val _ = if the_list (Axclass.class_of_param thy (snd c_c')) = [class] then ()
    71     val _ = if the_list (Axclass.class_of_param thy (snd c_c')) = [class] then ()
    72       else error ("Inconsistent class: " ^ Display.string_of_thm_global thy thm);
    72       else error ("Inconsistent class: " ^ Display.string_of_thm_global thy thm);