src/Tools/Code/code_ml.ML
changeset 39059 3a11a667af75
parent 39058 551fe1af03b0
child 39061 9b1fd2df743c
     1.1 --- a/src/Tools/Code/code_ml.ML	Thu Sep 02 14:59:28 2010 +0200
     1.2 +++ b/src/Tools/Code/code_ml.ML	Thu Sep 02 15:09:51 2010 +0200
     1.3 @@ -759,10 +759,10 @@
     1.4      fun modify_class stmts = single (SOME
     1.5        (ML_Class (the_single (map_filter
     1.6          (fn (name, Code_Thingol.Class (_, stmt)) => SOME (name, stmt) | _ => NONE) stmts))))
     1.7 -    fun modify_stmts ([stmt as (name, Code_Thingol.Fun _)]) =
     1.8 -          [modify_fun stmt]
     1.9 +    fun modify_stmts ([stmt as (name, stmt' as Code_Thingol.Fun _)]) =
    1.10 +          if Code_Thingol.is_case stmt' then [] else [modify_fun stmt]
    1.11        | modify_stmts ((stmts as (_, Code_Thingol.Fun _)::_)) =
    1.12 -          modify_funs stmts
    1.13 +          modify_funs (filter (Code_Thingol.is_case o snd) stmts)
    1.14        | modify_stmts ((stmts as (_, Code_Thingol.Datatypecons _)::_)) =
    1.15            modify_datatypes stmts
    1.16        | modify_stmts ((stmts as (_, Code_Thingol.Datatype _)::_)) =