src/Tools/Code/code_ml.ML
changeset 39061 9b1fd2df743c
parent 39059 3a11a667af75
child 39102 4ae1d212100f
equal deleted inserted replaced
39060:9b771df370ea 39061:9b1fd2df743c
   760       (ML_Class (the_single (map_filter
   760       (ML_Class (the_single (map_filter
   761         (fn (name, Code_Thingol.Class (_, stmt)) => SOME (name, stmt) | _ => NONE) stmts))))
   761         (fn (name, Code_Thingol.Class (_, stmt)) => SOME (name, stmt) | _ => NONE) stmts))))
   762     fun modify_stmts ([stmt as (name, stmt' as Code_Thingol.Fun _)]) =
   762     fun modify_stmts ([stmt as (name, stmt' as Code_Thingol.Fun _)]) =
   763           if Code_Thingol.is_case stmt' then [] else [modify_fun stmt]
   763           if Code_Thingol.is_case stmt' then [] else [modify_fun stmt]
   764       | modify_stmts ((stmts as (_, Code_Thingol.Fun _)::_)) =
   764       | modify_stmts ((stmts as (_, Code_Thingol.Fun _)::_)) =
   765           modify_funs (filter (Code_Thingol.is_case o snd) stmts)
   765           modify_funs (filter_out (Code_Thingol.is_case o snd) stmts)
   766       | modify_stmts ((stmts as (_, Code_Thingol.Datatypecons _)::_)) =
   766       | modify_stmts ((stmts as (_, Code_Thingol.Datatypecons _)::_)) =
   767           modify_datatypes stmts
   767           modify_datatypes stmts
   768       | modify_stmts ((stmts as (_, Code_Thingol.Datatype _)::_)) =
   768       | modify_stmts ((stmts as (_, Code_Thingol.Datatype _)::_)) =
   769           modify_datatypes stmts
   769           modify_datatypes stmts
   770       | modify_stmts ((stmts as (_, Code_Thingol.Class _)::_)) =
   770       | modify_stmts ((stmts as (_, Code_Thingol.Class _)::_)) =