src/HOL/Import/import_rule.ML
changeset 75616 986506233812
parent 75612 03ae0ba2aa9e
child 79336 032a31db4c6f
equal deleted inserted replaced
75615:4494cd69f97f 75616:986506233812
   439   in
   439   in
   440     process tstate (parse_line str)
   440     process tstate (parse_line str)
   441   end
   441   end
   442 
   442 
   443 fun process_file path thy =
   443 fun process_file path thy =
   444   #1 (fold process_line (Bytes.trim_split_lines (Bytes.read path)) (thy, init_state))
   444   #1 (fold process_line (File.read_lines path) (thy, init_state))
   445 
   445 
   446 val _ = Outer_Syntax.command \<^command_keyword>\<open>import_file\<close>
   446 val _ = Outer_Syntax.command \<^command_keyword>\<open>import_file\<close>
   447   "import a recorded proof file"
   447   "import a recorded proof file"
   448   (Parse.path >> (fn name => Toplevel.theory (fn thy => process_file (Path.explode name) thy)))
   448   (Parse.path >> (fn name => Toplevel.theory (fn thy => process_file (Path.explode name) thy)))
   449 
   449