1.1 --- a/src/Tools/Code/code_haskell.ML Mon Aug 30 16:11:09 2010 +0200
1.2 +++ b/src/Tools/Code/code_haskell.ML Mon Aug 30 16:17:10 2010 +0200
1.3 @@ -315,7 +315,7 @@
1.4
1.5 fun serialize_haskell module_prefix module_name string_classes labelled_name
1.6 raw_reserved includes module_alias
1.7 - syntax_class syntax_tyco syntax_const (code_of_pretty, code_writeln) program
1.8 + syntax_class syntax_tyco syntax_const program
1.9 (stmt_names, presentation_stmt_names) width =
1.10 let
1.11 val reserved = fold (insert (op =) o fst) includes raw_reserved;
1.12 @@ -377,7 +377,7 @@
1.13 if null presentation_stmt_names then serialize_module1 else pair "" o serialize_module2;
1.14 fun check_destination destination =
1.15 (File.check destination; destination);
1.16 - fun write_module destination (modlname, content) =
1.17 + fun write_module width destination (modlname, content) =
1.18 let
1.19 val filename = case modlname
1.20 of "" => Path.explode "Main.hs"
1.21 @@ -387,13 +387,13 @@
1.22 val _ = File.mkdir_leaf (Path.dir pathname);
1.23 in File.write pathname
1.24 ("{-# OPTIONS_GHC -fglasgow-exts #-}\n\n"
1.25 - ^ code_of_pretty content)
1.26 + ^ string_of_pretty width content)
1.27 end
1.28 in
1.29 Code_Target.mk_serialization
1.30 - (fn width => (fn NONE => K () o map (code_writeln o snd)
1.31 - | SOME file => K () o map (write_module (check_destination file))))
1.32 - (fn width => (rpair [] o cat_lines o map (code_of_pretty o snd)))
1.33 + (fn width => (fn NONE => K () o map (writeln_pretty width o snd)
1.34 + | SOME file => K () o map (write_module width (check_destination file))))
1.35 + (fn width => (rpair [] o cat_lines o map (string_of_pretty width o snd)))
1.36 (map (uncurry print_module) includes
1.37 @ map serialize_module (Symtab.dest hs_program))
1.38 width