src/Pure/Syntax/syn_ext.ML
changeset 368 e11b893cb7b6
parent 345 7007562172b1
child 369 5a7194eeb4ed
equal deleted inserted replaced
367:b734dc03067e 368:e11b893cb7b6
   324       map mkid Troots' @ map mkvar Troots' @ map constrain Troots' @
   324       map mkid Troots' @ map mkvar Troots' @ map constrain Troots' @
   325       map (apl (logicT, descend_right)) (Troots \\ [logicT, typeT]) @
   325       map (apl (logicT, descend_right)) (Troots \\ [logicT, typeT]) @
   326       map (apr (descend1, logic1T)) (Troots') @
   326       map (apr (descend1, logic1T)) (Troots') @
   327       flat (map unhide (Troots \\ [typeT]));
   327       flat (map unhide (Troots \\ [typeT]));
   328     val mfix_consts =
   328     val mfix_consts =
   329       distinct (filter is_xid (map (fn (Mfix (_, _, c, _, _)) => c) 
   329       distinct (map (fn (Mfix (_, _, c, _, _)) => c) (mfixes @ mfixes'));
   330                (mfixes @ mfixes')));
       
   331     val xprods = map mfix_to_xprod mfixes;
   330     val xprods = map mfix_to_xprod mfixes;
   332     val xprods' = map mfix_to_xprod mfixes';
   331     val xprods' = map mfix_to_xprod mfixes';
   333   in
   332   in
   334     SynExt {
   333     SynExt {
   335       roots = new_roots,
   334       roots = new_roots,
   336       xprods = (map (hide_xprod (all_roots \\ ["logic", "type"])) xprods) 
   335       xprods = (map (hide_xprod (all_roots \\ ["logic", "type"])) xprods) 
   337                @ xprods',    (* hide only productions that weren't created
   336                @ xprods',    (* hide only productions that weren't created
   338                                 automatically *)
   337                                 automatically *)
   339       consts = consts union mfix_consts,
   338       consts = filter is_xid (consts union mfix_consts),
   340       parse_ast_translation = parse_ast_translation,
   339       parse_ast_translation = parse_ast_translation,
   341       parse_rules = parse_rules,
   340       parse_rules = parse_rules,
   342       parse_translation = parse_translation,
   341       parse_translation = parse_translation,
   343       print_translation = print_translation,
   342       print_translation = print_translation,
   344       print_rules = print_rules,
   343       print_rules = print_rules,