src/ZF/Tools/datatype_package.ML
changeset 41310 65631ca437c9
parent 39557 fe5722fce758
child 42290 b1f544c84040
equal deleted inserted replaced
41309:2e9bf718a7a1 41310:65631ca437c9
    89   val case_varname = "f";                (*name for case variables*)
    89   val case_varname = "f";                (*name for case variables*)
    90 
    90 
    91   (** Define the constructors **)
    91   (** Define the constructors **)
    92 
    92 
    93   (*The empty tuple is 0*)
    93   (*The empty tuple is 0*)
    94   fun mk_tuple [] = @{const "0"}
    94   fun mk_tuple [] = @{const zero}
    95     | mk_tuple args = foldr1 (fn (t1, t2) => Pr.pair $ t1 $ t2) args;
    95     | mk_tuple args = foldr1 (fn (t1, t2) => Pr.pair $ t1 $ t2) args;
    96 
    96 
    97   fun mk_inject n k u = Balanced_Tree.access
    97   fun mk_inject n k u = Balanced_Tree.access
    98     {left = fn t => Su.inl $ t, right = fn t => Su.inr $ t, init = u} n k;
    98     {left = fn t => Su.inl $ t, right = fn t => Su.inr $ t, init = u} n k;
    99 
    99