src/Tools/code/code_thingol.ML
changeset 31088 36a011423fcc
parent 31063 88aaab83b6fc
child 31125 80218ee73167
equal deleted inserted replaced
31087:a95816259c77 31088:36a011423fcc
   589             translate_app thy algbr funcgr thm ((c, ty), ts)
   589             translate_app thy algbr funcgr thm ((c, ty), ts)
   590         | (t', ts) =>
   590         | (t', ts) =>
   591             translate_term thy algbr funcgr thm t'
   591             translate_term thy algbr funcgr thm t'
   592             ##>> fold_map (translate_term thy algbr funcgr thm) ts
   592             ##>> fold_map (translate_term thy algbr funcgr thm) ts
   593             #>> (fn (t, ts) => t `$$ ts)
   593             #>> (fn (t, ts) => t `$$ ts)
   594 and translate_eq thy algbr funcgr (thm, linear) =
   594 and translate_eq thy algbr funcgr (thm, proper) =
   595   let
   595   let
   596     val (args, rhs) = (apfst (snd o strip_comb) o Logic.dest_equals
   596     val (args, rhs) = (apfst (snd o strip_comb) o Logic.dest_equals
   597       o Logic.unvarify o prop_of) thm;
   597       o Logic.unvarify o prop_of) thm;
   598   in
   598   in
   599     fold_map (translate_term thy algbr funcgr (SOME thm)) args
   599     fold_map (translate_term thy algbr funcgr (SOME thm)) args
   600     ##>> translate_term thy algbr funcgr (SOME thm) rhs
   600     ##>> translate_term thy algbr funcgr (SOME thm) rhs
   601     #>> rpair (thm, linear)
   601     #>> rpair (thm, proper)
   602   end
   602   end
   603 and translate_const thy algbr funcgr thm (c, ty) =
   603 and translate_const thy algbr funcgr thm (c, ty) =
   604   let
   604   let
   605     val tys = Sign.const_typargs thy (c, ty);
   605     val tys = Sign.const_typargs thy (c, ty);
   606     val sorts = (map snd o fst o Code_Wellsorted.typ funcgr) c;
   606     val sorts = (map snd o fst o Code_Wellsorted.typ funcgr) c;