src/Pure/Syntax/mixfix.ML
changeset 19482 9f11af8f7ef9
parent 19467 d75570e8aa97
child 19673 853f5a3cc06e
equal deleted inserted replaced
19481:a6205c6203ea 19482:9f11af8f7ef9
   181         | (sy, 2, Infixl p) => SOME (mk_infix sy t p (p + 1) p)
   181         | (sy, 2, Infixl p) => SOME (mk_infix sy t p (p + 1) p)
   182         | (sy, 2, Infixr p) => SOME (mk_infix sy t (p + 1) p p)
   182         | (sy, 2, Infixr p) => SOME (mk_infix sy t (p + 1) p p)
   183         | _ => error ("Bad mixfix declaration for type: " ^ quote t))
   183         | _ => error ("Bad mixfix declaration for type: " ^ quote t))
   184       end;
   184       end;
   185 
   185 
   186     val mfix = List.mapPartial mfix_of type_decls;
   186     val mfix = map_filter mfix_of type_decls;
   187     val xconsts = map name_of type_decls;
   187     val xconsts = map name_of type_decls;
   188   in SynExt.syn_ext mfix xconsts ([], [], [], []) [] ([], []) end;
   188   in SynExt.syn_ext mfix xconsts ([], [], [], []) [] ([], []) end;
   189 
   189 
   190 
   190 
   191 (* syn_ext_consts *)
   191 (* syn_ext_consts *)
   222     end;
   222     end;
   223 
   223 
   224     fun binder (c, _, Binder (sy, _, _)) = SOME (sy, c)
   224     fun binder (c, _, Binder (sy, _, _)) = SOME (sy, c)
   225       | binder _ = NONE;
   225       | binder _ = NONE;
   226 
   226 
   227     val mfix = List.concat (map mfix_of const_decls);
   227     val mfix = maps mfix_of const_decls;
   228     val xconsts = map name_of const_decls;
   228     val xconsts = map name_of const_decls;
   229     val binders = List.mapPartial binder const_decls;
   229     val binders = map_filter binder const_decls;
   230     val binder_trs = binders |> map (SynExt.stamp_trfun binder_stamp o
   230     val binder_trs = binders |> map (SynExt.stamp_trfun binder_stamp o
   231         apsnd K o SynTrans.mk_binder_tr);
   231         apsnd K o SynTrans.mk_binder_tr);
   232     val binder_trs' = binders |> map (SynExt.stamp_trfun binder_stamp o
   232     val binder_trs' = binders |> map (SynExt.stamp_trfun binder_stamp o
   233         apsnd (K o SynTrans.non_typed_tr') o SynTrans.mk_binder_tr' o swap);
   233         apsnd (K o SynTrans.non_typed_tr') o SynTrans.mk_binder_tr' o swap);
   234   in
   234   in