get_recdef now returns None instead of raising ERROR.
authorberghofe
Wed, 15 Mar 2000 23:40:59 +0100
changeset 8481 89d498a8d3f6
parent 8480 50266d517b0c
child 8482 bbc805ebc904
get_recdef now returns None instead of raising ERROR.
src/HOL/Tools/recdef_package.ML
--- a/src/HOL/Tools/recdef_package.ML	Wed Mar 15 23:39:45 2000 +0100
+++ b/src/HOL/Tools/recdef_package.ML	Wed Mar 15 23:40:59 2000 +0100
@@ -9,7 +9,7 @@
 sig
   val quiet_mode: bool ref
   val print_recdefs: theory -> unit
-  val get_recdef: theory -> string -> {rules: thm list, induct: thm, tcs: term list}
+  val get_recdef: theory -> string -> {rules: thm list, induct: thm, tcs: term list} option
   val add_recdef: xstring -> string -> string list -> simpset option
     -> (xstring * Args.src list) list -> theory
     -> theory * {rules: thm list, induct: thm, tcs: term list}
@@ -58,10 +58,7 @@
 
 (* get and put data *)
 
-fun get_recdef thy name =
-  (case Symtab.lookup (RecdefData.get thy, name) of
-    Some info => info
-  | None => error ("Unknown recursive function " ^ quote name));
+fun get_recdef thy name = Symtab.lookup (RecdefData.get thy, name);
 
 fun put_recdef name info thy =
   let