equal
deleted
inserted
replaced
351 fun write_module width (SOME destination) (module_name, content) = |
351 fun write_module width (SOME destination) (module_name, content) = |
352 let |
352 let |
353 val _ = File.check destination; |
353 val _ = File.check destination; |
354 val filepath = (Path.append destination o Path.ext "hs" o Path.explode o implode |
354 val filepath = (Path.append destination o Path.ext "hs" o Path.explode o implode |
355 o separate "/" o Long_Name.explode) module_name; |
355 o separate "/" o Long_Name.explode) module_name; |
356 val _ = Isabelle_System.mkdir (Path.dir filepath); |
356 val _ = Isabelle_System.mkdirs (Path.dir filepath); |
357 in |
357 in |
358 (File.write filepath o format [] width o Pretty.chunks2) |
358 (File.write filepath o format [] width o Pretty.chunks2) |
359 [str "{-# LANGUAGE ScopedTypeVariables #-}", content] |
359 [str "{-# LANGUAGE ScopedTypeVariables #-}", content] |
360 end |
360 end |
361 | write_module width NONE (_, content) = writeln (format [] width content); |
361 | write_module width NONE (_, content) = writeln (format [] width content); |