src/Pure/Thy/ROOT.ML
changeset 4055 69892b85f800
parent 3625 33f718b4f7bf
child 4115 9405ebe284bf
equal deleted inserted replaced
4054:b33e02b3478e 4055:69892b85f800
    18 use "thy_read.ML";
    18 use "thy_read.ML";
    19 
    19 
    20 open ThmDatabase ThyRead ThyInfo BrowserInfo SymbolInput;
    20 open ThmDatabase ThyRead ThyInfo BrowserInfo SymbolInput;
    21 
    21 
    22 
    22 
    23 (* FIXME tmp *)
       
    24 
    23 
    25 fun set_session s =
    24 (* FIXME tmp, move *)
    26   writeln ("This is the " ^ quote s ^ " session.");
    25 
       
    26 structure Session =
       
    27 struct
       
    28 
       
    29 local
       
    30   val current_session = ref ([]: string list);
       
    31 in
       
    32   fun get_session () = ! current_session;
       
    33   fun add_session s =
       
    34     (current_session := ! current_session @ [s];
       
    35       writeln ("This is the " ^ quote (space_implode "/" (get_session ())) ^ " session."));
       
    36 end;
       
    37 
       
    38 end;
       
    39 
       
    40 open Session
       
    41 
       
    42 
       
    43 structure Context =
       
    44 struct
       
    45 
       
    46 local
       
    47   val current_thy = ref ProtoPure.thy;
       
    48 in
       
    49   fun context thy = current_thy := thy;
       
    50   fun get_context () = ! current_thy;
       
    51 end;
       
    52 
       
    53 end;
       
    54 
       
    55 open Context;