--- a/src/Tools/Code/code_haskell.ML Tue Nov 03 17:54:24 2009 +0100
+++ b/src/Tools/Code/code_haskell.ML Tue Nov 03 19:32:08 2009 +0100
@@ -360,14 +360,10 @@
fun serialize_module1 (module_name', (deps, (stmts, _))) =
let
val stmt_names = map fst stmts;
- val deps' = subtract (op =) stmt_names deps
+ val qualified = is_none module_name;
+ val imports = subtract (op =) stmt_names deps
|> distinct (op =)
- |> map_filter (try deresolver);
- val qualified = is_none module_name andalso
- map deresolver stmt_names @ deps'
- |> map Long_Name.base_name
- |> has_duplicates (op =);
- val imports = deps'
+ |> map_filter (try deresolver)
|> map Long_Name.qualifier
|> distinct (op =);
fun pr_import_include (name, _) = str ("import qualified " ^ name ^ ";");
--- a/src/Tools/Code/code_thingol.ML Tue Nov 03 17:54:24 2009 +0100
+++ b/src/Tools/Code/code_thingol.ML Tue Nov 03 19:32:08 2009 +0100
@@ -261,7 +261,8 @@
| NONE => (case Code.get_datatype_of_constr thy c
of SOME dtco => Codegen.thyname_of_type thy dtco
| NONE => Codegen.thyname_of_const thy c);
- fun purify_base "op &" = "and"
+ fun purify_base "==>" = "follows"
+ | purify_base "op &" = "and"
| purify_base "op |" = "or"
| purify_base "op -->" = "implies"
| purify_base "op :" = "member"