src/Tools/Code/code_scala.ML
changeset 37651 62fc16341922
parent 37639 5b6733e6e033
child 37661 f6b592f2aca4
equal deleted inserted replaced
37641:39bd6f7c25c2 37651:62fc16341922
   374         val filename = case modlname
   374         val filename = case modlname
   375          of "" => Path.explode "Main.scala"
   375          of "" => Path.explode "Main.scala"
   376           | _ => (Path.ext "scala" o Path.explode o implode o separate "/"
   376           | _ => (Path.ext "scala" o Path.explode o implode o separate "/"
   377                 o Long_Name.explode) modlname;
   377                 o Long_Name.explode) modlname;
   378         val pathname = Path.append destination filename;
   378         val pathname = Path.append destination filename;
   379         val _ = File.mkdir (Path.dir pathname);
   379         val _ = File.mkdir_leaf (Path.dir pathname);
   380       in File.write pathname (code_of_pretty content) end
   380       in File.write pathname (code_of_pretty content) end
   381   in
   381   in
   382     Code_Target.mk_serialization target NONE
   382     Code_Target.mk_serialization target NONE
   383       (fn NONE => K () o map (code_writeln o snd) | SOME file => K () o map
   383       (fn NONE => K () o map (code_writeln o snd) | SOME file => K () o map
   384         (write_module (check_destination file)))
   384         (write_module (check_destination file)))