src/Pure/Thy/thm_database.ML
changeset 7573 aa87cf5a15f5
parent 7446 f43d3670a3cd
child 7609 1acbed762fc6
equal deleted inserted replaced
7572:6e6dafacbc28 7573:aa87cf5a15f5
    62 fun is_ml_identifier name =
    62 fun is_ml_identifier name =
    63   Syntax.is_identifier name andalso not (name mem ml_reserved);
    63   Syntax.is_identifier name andalso not (name mem ml_reserved);
    64 
    64 
    65 fun warn_ml name =
    65 fun warn_ml name =
    66   if is_ml_identifier name then false
    66   if is_ml_identifier name then false
       
    67   else if name = "" then true
    67   else (warning ("Cannot bind theorem(s) " ^ quote name ^ " as ML value"); true);
    68   else (warning ("Cannot bind theorem(s) " ^ quote name ^ " as ML value"); true);
    68 
    69 
    69 fun ml_store_thm (name, thm) =
    70 fun ml_store_thm (name, thm) =
    70   let val thm' = store_thm (name, thm) in
    71   let val thm' = store_thm (name, thm) in
    71     if warn_ml name then ()
    72     if warn_ml name then ()