src/Tools/Code/code_thingol.ML
changeset 31957 a9742afd403e
parent 31935 3896169e6ff9
child 31962 baa8dce5bc45
     1.1 --- a/src/Tools/Code/code_thingol.ML	Tue Jul 07 17:21:26 2009 +0200
     1.2 +++ b/src/Tools/Code/code_thingol.ML	Tue Jul 07 17:21:27 2009 +0200
     1.3 @@ -627,8 +627,8 @@
     1.4      fun arg_types num_args ty = (fst o chop num_args o fst o strip_type) ty;
     1.5      val tys = arg_types num_args (snd c_ty);
     1.6      val ty = nth tys t_pos;
     1.7 -    fun mk_constr c t = let val n = Code.no_args thy c
     1.8 -      in ((c, arg_types (Code.no_args thy c) (fastype_of t) ---> ty), n) end;
     1.9 +    fun mk_constr c t = let val n = Code.args_number thy c
    1.10 +      in ((c, arg_types n (fastype_of t) ---> ty), n) end;
    1.11      val constrs = if null case_pats then []
    1.12        else map2 mk_constr case_pats (nth_drop t_pos ts);
    1.13      fun casify naming constrs ty ts =