src/HOL/Tools/choice_specification.ML
changeset 33317 b4534348b8fd
parent 33245 65232054ffd0
child 33339 d41f77196338
equal deleted inserted replaced
33316:6a72af4e84b8 33317:b4534348b8fd
   141         fun proc_const c =
   141         fun proc_const c =
   142             let
   142             let
   143                 val (_, c') = Type.varify [] c
   143                 val (_, c') = Type.varify [] c
   144                 val (cname,ctyp) = dest_Const c'
   144                 val (cname,ctyp) = dest_Const c'
   145             in
   145             in
   146                 case List.filter (fn t => let val (name,typ) = dest_Const t
   146                 case filter (fn t => let val (name,typ) = dest_Const t
   147                                      in name = cname andalso Sign.typ_equiv thy (typ, ctyp)
   147                                      in name = cname andalso Sign.typ_equiv thy (typ, ctyp)
   148                                      end) thawed_prop_consts of
   148                                      end) thawed_prop_consts of
   149                     [] => error ("Specification: No suitable instances of constant \"" ^ Syntax.string_of_term_global thy c ^ "\" found")
   149                     [] => error ("Specification: No suitable instances of constant \"" ^ Syntax.string_of_term_global thy c ^ "\" found")
   150                   | [cf] => unvarify cf vmap
   150                   | [cf] => unvarify cf vmap
   151                   | _ => error ("Specification: Several variations of \"" ^ Syntax.string_of_term_global thy c ^ "\" found (try applying explicit type constraints)")
   151                   | _ => error ("Specification: Several variations of \"" ^ Syntax.string_of_term_global thy c ^ "\" found (try applying explicit type constraints)")