src/Pure/Thy/thy_load.ML
changeset 26881 bb68f50644a9
parent 26616 b5fd3ad271ec
child 29418 d584715a3ebb
equal deleted inserted replaced
26880:ebcd5c23dd96 26881:bb68f50644a9
    96 fun deps_thy dir name =
    96 fun deps_thy dir name =
    97   let
    97   let
    98     val master as (path, _) = check_thy dir name;
    98     val master as (path, _) = check_thy dir name;
    99     val text = explode (File.read path);
    99     val text = explode (File.read path);
   100     val (name', imports, uses) =
   100     val (name', imports, uses) =
   101       ThyHeader.read (Position.path path) (Source.of_list_limited 8000 text);
   101       ThyHeader.read (Path.position path) (Source.of_list_limited 8000 text);
   102     val _ = name = name' orelse
   102     val _ = name = name' orelse
   103       error ("Filename " ^ quote (Path.implode (Path.base path)) ^
   103       error ("Filename " ^ quote (Path.implode (Path.base path)) ^
   104         " does not agree with theory name " ^ quote name');
   104         " does not agree with theory name " ^ quote name');
   105     val uses = map (Path.explode o #1) uses;
   105     val uses = map (Path.explode o #1) uses;
   106   in {master = master, text = text, imports = imports, uses = uses} end;
   106   in {master = master, text = text, imports = imports, uses = uses} end;