src/Tools/Code/code_target.ML
changeset 31957 a9742afd403e
parent 31775 2b04504fcb69
child 32740 9dd0a2f83429
equal deleted inserted replaced
31956:c3844c4d0c2c 31957:a9742afd403e
   284   end;
   284   end;
   285 
   285 
   286 fun gen_add_syntax_const prep_const target raw_c raw_syn thy =
   286 fun gen_add_syntax_const prep_const target raw_c raw_syn thy =
   287   let
   287   let
   288     val c = prep_const thy raw_c;
   288     val c = prep_const thy raw_c;
   289     fun check_args (syntax as (n, _)) = if n > Code.no_args thy c
   289     fun check_args (syntax as (n, _)) = if n > Code.args_number thy c
   290       then error ("Too many arguments in syntax for constant " ^ quote c)
   290       then error ("Too many arguments in syntax for constant " ^ quote c)
   291       else syntax;
   291       else syntax;
   292   in case raw_syn
   292   in case raw_syn
   293    of SOME syntax =>
   293    of SOME syntax =>
   294       thy
   294       thy