equal
deleted
inserted
replaced
18 include BASIC_THY_LOAD |
18 include BASIC_THY_LOAD |
19 val ml_path: string -> Path.T |
19 val ml_path: string -> Path.T |
20 val find_file: Path.T -> (Path.T * File.info) option |
20 val find_file: Path.T -> (Path.T * File.info) option |
21 val check_file: Path.T -> File.info option |
21 val check_file: Path.T -> File.info option |
22 val load_file: Path.T -> File.info |
22 val load_file: Path.T -> File.info |
23 val check_thy: string -> File.info |
23 val check_thy: string -> bool -> File.info |
24 val deps_thy: string -> bool -> File.info * (string list * Path.T list) |
24 val deps_thy: string -> bool -> File.info * (string list * Path.T list) |
25 val load_thy: string -> bool -> bool -> File.info |
25 val load_thy: string -> bool -> bool -> File.info |
26 end; |
26 end; |
27 |
27 |
28 signature PRIVATE_THY_LOAD = |
28 signature PRIVATE_THY_LOAD = |
84 (*hooks for theory syntax dependent operations*) |
84 (*hooks for theory syntax dependent operations*) |
85 fun undefined _ = raise Match; |
85 fun undefined _ = raise Match; |
86 val deps_thy_fn = ref (undefined: string -> bool -> Path.T -> string list * Path.T list); |
86 val deps_thy_fn = ref (undefined: string -> bool -> Path.T -> string list * Path.T list); |
87 val load_thy_fn = ref (undefined: string -> bool -> bool -> Path.T -> unit); |
87 val load_thy_fn = ref (undefined: string -> bool -> bool -> Path.T -> unit); |
88 |
88 |
89 val check_thy = #1 o process_thy (K ()); |
89 fun check_thy name ml = |
|
90 let val (thy_info, _) = process_thy (K ()) name in |
|
91 (case if ml then check_file (ml_path name) else None of |
|
92 None => thy_info |
|
93 | Some info => File.join_info thy_info info) |
|
94 end; |
|
95 |
90 fun deps_thy name ml = process_thy (fn path => ! deps_thy_fn name ml path) name; |
96 fun deps_thy name ml = process_thy (fn path => ! deps_thy_fn name ml path) name; |
91 fun load_thy name ml time = #1 (process_thy (fn path => ! load_thy_fn name ml time path) name); |
97 fun load_thy name ml time = #1 (process_thy (fn path => ! load_thy_fn name ml time path) name); |
92 |
98 |
93 |
99 |
94 end; |
100 end; |