--- a/src/Tools/Code/code_ml.ML Thu Sep 02 14:59:28 2010 +0200
+++ b/src/Tools/Code/code_ml.ML Thu Sep 02 15:09:51 2010 +0200
@@ -759,10 +759,10 @@
fun modify_class stmts = single (SOME
(ML_Class (the_single (map_filter
(fn (name, Code_Thingol.Class (_, stmt)) => SOME (name, stmt) | _ => NONE) stmts))))
- fun modify_stmts ([stmt as (name, Code_Thingol.Fun _)]) =
- [modify_fun stmt]
+ fun modify_stmts ([stmt as (name, stmt' as Code_Thingol.Fun _)]) =
+ if Code_Thingol.is_case stmt' then [] else [modify_fun stmt]
| modify_stmts ((stmts as (_, Code_Thingol.Fun _)::_)) =
- modify_funs stmts
+ modify_funs (filter (Code_Thingol.is_case o snd) stmts)
| modify_stmts ((stmts as (_, Code_Thingol.Datatypecons _)::_)) =
modify_datatypes stmts
| modify_stmts ((stmts as (_, Code_Thingol.Datatype _)::_)) =
--- a/src/Tools/Code/code_scala.ML Thu Sep 02 14:59:28 2010 +0200
+++ b/src/Tools/Code/code_scala.ML Thu Sep 02 15:09:51 2010 +0200
@@ -317,7 +317,8 @@
val implicits = filter (is_classinst o Graph.get_node program)
(Graph.imm_succs program name);
in union (op =) implicits end;
- fun modify_stmt (_, Code_Thingol.Datatypecons _) = NONE
+ fun modify_stmt (_, Code_Thingol.Fun (_, (_, SOME _))) = NONE
+ | modify_stmt (_, Code_Thingol.Datatypecons _) = NONE
| modify_stmt (_, Code_Thingol.Classrel _) = NONE
| modify_stmt (_, Code_Thingol.Classparam _) = NONE
| modify_stmt (_, stmt) = SOME stmt;