equal
deleted
inserted
replaced
44 |
44 |
45 |
45 |
46 |
46 |
47 (** thy database **) |
47 (** thy database **) |
48 |
48 |
|
49 (* base name *) |
|
50 |
|
51 fun base_name s = Path.implode (Path.base (Path.explode s)); |
|
52 |
|
53 |
49 (* messages *) |
54 (* messages *) |
50 |
55 |
51 fun loader_msg txt [] = "Theory loader: " ^ txt |
56 fun loader_msg txt [] = "Theory loader: " ^ txt |
52 | loader_msg txt names = "Theory loader: " ^ txt ^ " " ^ commas_quote names; |
57 | loader_msg txt names = "Theory loader: " ^ txt ^ " " ^ commas_quote names; |
53 |
58 |
71 imports: string list}; (*source specification of imports (partially qualified)*) |
76 imports: string list}; (*source specification of imports (partially qualified)*) |
72 |
77 |
73 fun make_deps master imports : deps = {master = master, imports = imports}; |
78 fun make_deps master imports : deps = {master = master, imports = imports}; |
74 |
79 |
75 fun master_dir (d: deps option) = the_default Path.current (Option.map (Path.dir o #1 o #master) d); |
80 fun master_dir (d: deps option) = the_default Path.current (Option.map (Path.dir o #1 o #master) d); |
76 fun base_name s = Path.implode (Path.base (Path.explode s)); |
|
77 |
81 |
78 local |
82 local |
79 val database = Unsynchronized.ref (Graph.empty: (deps option * theory option) Graph.T); |
83 val database = Unsynchronized.ref (Graph.empty: (deps option * theory option) Graph.T); |
80 in |
84 in |
81 fun get_thys () = ! database; |
85 fun get_thys () = ! database; |