src/HOL/List.thy
changeset 18704 2c86ced392a8
parent 18702 7dc7dcd63224
child 18708 4b3dadb4fe33
equal deleted inserted replaced
18703:13e11abcfc96 18704:2c86ced392a8
  2650      end handle Fail _ => NONE | Match => NONE)
  2650      end handle Fail _ => NONE | Match => NONE)
  2651   | char_codegen thy defs gr dep thyname b _ = NONE;
  2651   | char_codegen thy defs gr dep thyname b _ = NONE;
  2652 
  2652 
  2653 in
  2653 in
  2654 
  2654 
  2655 val list_codegen_setup =
  2655 val list_codegen_setup = [
  2656   [Codegen.add_codegen "list_codegen" list_codegen,
  2656   Codegen.add_codegen "list_codegen" list_codegen,
  2657    Codegen.add_codegen "char_codegen" char_codegen];
  2657   Codegen.add_codegen "char_codegen" char_codegen,
       
  2658   fold (CodegenPackage.add_pretty_list "Nil" "Cons") [
       
  2659     ("ml", (7, "::")),
       
  2660     ("haskell", (5, ":")) 
       
  2661   ] 
       
  2662 ];
  2658 
  2663 
  2659 end;
  2664 end;
  2660 *}
  2665 *}
  2661 
  2666 
  2662 types_code
  2667 types_code
  2695 
  2700 
  2696 code_syntax_const
  2701 code_syntax_const
  2697   Nil
  2702   Nil
  2698     ml (atom "[]")
  2703     ml (atom "[]")
  2699     haskell (atom "[]")
  2704     haskell (atom "[]")
  2700   Cons
       
  2701     ml (infixr 7 "::" )
       
  2702     haskell (infixr 5 ":")
       
  2703 
  2705 
  2704 setup list_codegen_setup
  2706 setup list_codegen_setup
  2705 
  2707 
  2706 setup "[CodegenPackage.rename_inconsistent]"
  2708 setup "[CodegenPackage.rename_inconsistent]"
  2707 
  2709