# HG changeset patch # User haftmann # Date 1233579384 -3600 # Node ID 64d41ad4ffc2416fc87b2238473366361cf61467 # Parent f2e70a0636b9867ba44adf21fdea4c788fdccdd7 avoid name clash of generated modules and includes diff -r f2e70a0636b9 -r 64d41ad4ffc2 src/Tools/code/code_haskell.ML --- a/src/Tools/code/code_haskell.ML Mon Feb 02 13:56:23 2009 +0100 +++ b/src/Tools/code/code_haskell.ML Mon Feb 02 13:56:24 2009 +0100 @@ -336,11 +336,12 @@ in (deresolver, hs_program) end; fun serialize_haskell module_prefix raw_module_name string_classes labelled_name - reserved_names includes raw_module_alias + raw_reserved_names includes raw_module_alias syntax_class syntax_tyco syntax_const naming program cs destination = let val stmt_names = Code_Target.stmt_names_of_destination destination; val module_name = if null stmt_names then raw_module_name else SOME "Code"; + val reserved_names = fold (insert (op =) o fst) includes raw_reserved_names; val (deresolver, hs_program) = haskell_program_of_program labelled_name module_name module_prefix reserved_names raw_module_alias program; val is_cons = Code_Thingol.is_cons program;