equal
deleted
inserted
replaced
|
1 theory Classy |
|
2 imports Pure |
|
3 keywords |
|
4 "ML.class" :: thy_decl % "ML" and |
|
5 "ML.instance" :: thy_decl % "ML" and |
|
6 "ML.print_classes" :: diag |
|
7 begin |
|
8 |
|
9 (* FIXME unfold in ML files *) |
|
10 ML\<open> |
|
11 val secure_use_text = ML_Compiler0.ML |
|
12 val context_set_thread_data = Context.setmp_generic_context |
|
13 fun ml_env_context return : ML_Compiler0.context = |
|
14 {name_space = #name_space ML_Env.context, |
|
15 print_depth = SOME 1000000, |
|
16 here = #here ML_Env.context, |
|
17 print = fn r => return := SOME r, |
|
18 error = #error ML_Env.context} |
|
19 val print_int = Value.print_int |
|
20 \<close> |
|
21 |
|
22 ML_file "ml_types.ML" |
|
23 ML_file "classy.ML" |
|
24 |
|
25 setup \<open>Classy.setup\<close> |
|
26 |
|
27 ML_file "pretty_class.ML" |
|
28 |
|
29 ML.class pretty = \<open>'a pretty_class\<close> |
|
30 |
|
31 ML.instance \<open>Pretty_Class.string\<close> :: pretty |
|
32 ML.instance \<open>Pretty_Class.pretty\<close> :: pretty |
|
33 ML.instance \<open>Pretty_Class.list\<close> :: pretty |
|
34 |
|
35 end |