CookBook/antiquote_setup_plus.ML
changeset 15 9da9ba2b095b
child 26 2311f81d7a22
equal deleted inserted replaced
14:1c17e99f6f66 15:9da9ba2b095b
       
     1 (*
       
     2 Auxiliary antiquotations for the Cookbook.
       
     3 
       
     4 *)
       
     5 
       
     6 local structure O = ThyOutput
       
     7 in
       
     8   fun check_exists f = 
       
     9     if File.exists (Path.explode ("~~/src/" ^ f)) then ()
       
    10     else error ("Source file " ^ quote f ^ " does not exist.")
       
    11   
       
    12   val _ = O.add_commands
       
    13    [("ML_file", O.args (Scan.lift Args.name) (O.output (fn _ => fn name =>
       
    14          (check_exists name; Pretty.str name))))];
       
    15 
       
    16 end