for functions with only variable patterns, fixrec definitions no longer use Fixrec.return/Fixrec.run
--- a/src/HOLCF/Tools/fixrec.ML Sat May 22 17:57:16 2010 -0700
+++ b/src/HOLCF/Tools/fixrec.ML Sat May 22 18:34:38 2010 -0700
@@ -78,9 +78,16 @@
in Const(@{const_name Fixrec.mplus}, mT ->> mT ->> mT) ` t ` u end;
fun mk_run t =
- let val mT = Term.fastype_of t
- val T = dest_matchT mT
- in Const(@{const_name Fixrec.run}, mT ->> T) ` t end;
+ let
+ val mT = Term.fastype_of t
+ val T = dest_matchT mT
+ val run = Const(@{const_name Fixrec.run}, mT ->> T)
+ in
+ case t of
+ Const(@{const_name Rep_CFun}, _) $
+ Const(@{const_name Fixrec.return}, _) $ u => u
+ | _ => run ` t
+ end;
(*************************************************************************)
@@ -129,7 +136,7 @@
val prop = mk_trp (mk_cont functional);
fun err _ = error (
"Continuity proof failed; please check that cont2cont rules\n" ^
- "are configured for all non-HOLCF constants.\n" ^
+ "or simp rules are configured for all non-HOLCF constants.\n" ^
"The error occurred for the goal statement:\n" ^
Syntax.string_of_term lthy prop);
val rules = Cont2ContData.get lthy;