# HG changeset patch # User wenzelm # Date 1384203657 -3600 # Node ID 4de1dd7999672dc224d9ade78e299ca291f9212a # Parent 3514fdfdf59b0b0c6e461cf09649375aa8cb1b03# Parent f14791d4f08d67dc5e9100ec0584176394e1da6f merged diff -r 3514fdfdf59b -r 4de1dd799967 Admin/MacOS/App1/README --- a/Admin/MacOS/App1/README Mon Nov 11 20:51:00 2013 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -Isabelle application bundle for MacOS -===================================== - -Requirements: - -* CocoaDialog 2.1.1 http://cocoadialog.sourceforge.net/ - -* Platypus 4.7 http://www.sveinbjorn.org/platypus - Preferences: Install command line tool - -* final packaging: - - hdiutil create -srcfolder DIR DMG - diff -r 3514fdfdf59b -r 4de1dd799967 Admin/MacOS/App1/build --- a/Admin/MacOS/App1/build Mon Nov 11 20:51:00 2013 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -# -# Make Isabelle application bundle - -THIS="$(cd "$(dirname "$0")"; pwd)" - -COCOADIALOG_APP="/Applications/CocoaDialog.app" - -/usr/local/bin/platypus \ - -a Isabelle -u Isabelle \ - -I "de.tum.in.isabelle" \ - -i "$THIS/../isabelle.icns" \ - -D -X thy \ - -Q "$THIS/../theory.icns" \ - -p /bin/bash \ - -R \ - -o None \ - -f "$COCOADIALOG_APP" \ - "$THIS/script" \ - "$PWD/Isabelle.app" - -rm -f Contents/Resources/Isabelle -ln -s Contents/Resources/Isabelle Isabelle.app/Isabelle \ No newline at end of file diff -r 3514fdfdf59b -r 4de1dd799967 Admin/MacOS/App1/script --- a/Admin/MacOS/App1/script Mon Nov 11 20:51:00 2013 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -#!/usr/bin/env bash -# -# Author: Makarius -# -# Isabelle application wrapper - -THIS="$(cd "$(dirname "$0")"; pwd)" -THIS_APP="$(cd "$THIS/../.."; pwd)" -SUPER_APP="$(cd "$THIS/../../.."; pwd)" - - -# global defaults - -ISABELLE_TOOL="$THIS/Isabelle/bin/isabelle" -PROOFGENERAL_EMACS="$THIS/Aquamacs.app/Contents/MacOS/Aquamacs" - - -# environment - -cd "$HOME" -if [ -x /usr/libexec/path_helper ]; then - eval $(/usr/libexec/path_helper -s) -fi - -[ -z "$LANG" ] && export LANG=en_US.UTF-8 - - -# run interface with error feedback - -ISABELLE_INTERFACE_CHOICE="$("$ISABELLE_TOOL" getenv -b ISABELLE_INTERFACE_CHOICE)" -if [ "$ISABELLE_INTERFACE_CHOICE" != emacs -a "$ISABELLE_INTERFACE_CHOICE" != jedit ] -then - declare -a CHOICE - CHOICE=($("$THIS/CocoaDialog.app/Contents/MacOS/CocoaDialog" dropdown \ - --title Isabelle \ - --text "Which Isabelle interface?" \ - --items "Isabelle/jEdit PIDE" "Emacs / Proof General" \ - --button2 "OK, do not ask again" --button1 "OK")) - if [ "${CHOICE[1]}" = 0 ]; then - ISABELLE_INTERFACE_CHOICE=jedit - else - ISABELLE_INTERFACE_CHOICE=emacs - fi - if [ "${CHOICE[0]}" = 2 ]; then - ISABELLE_HOME_USER="$("$ISABELLE_TOOL" getenv -b ISABELLE_HOME_USER)" - mkdir -p "$ISABELLE_HOME_USER/etc" - ( echo; echo "ISABELLE_INTERFACE_CHOICE=$ISABELLE_INTERFACE_CHOICE"; ) \ - >> "$ISABELLE_HOME_USER/etc/settings" - "$THIS/CocoaDialog.app/Contents/MacOS/CocoaDialog" ok-msgbox \ - --title Isabelle \ - --text Note \ - --informative-text "ISABELLE_INTERFACE_CHOICE stored in $ISABELLE_HOME_USER/etc/settings" \ - --no-cancel - fi -fi - -OUTPUT="/tmp/isabelle$$.out" - -if [ "$ISABELLE_INTERFACE_CHOICE" = emacs ]; then - ( "$ISABELLE_TOOL" emacs -p "$PROOFGENERAL_EMACS" "$@" ) > "$OUTPUT" 2>&1 - RC=$? -else - ( "$ISABELLE_TOOL" jedit -s "$@" ) > "$OUTPUT" 2>&1 - RC=$? -fi - -if [ "$RC" != 0 ]; then - echo >> "$OUTPUT" - echo "Return code: $RC" >> "$OUTPUT" -fi - -if [ $(stat -f "%z" "$OUTPUT") != 0 ]; then - "$THIS/CocoaDialog.app/Contents/MacOS/CocoaDialog" textbox \ - --title "Isabelle" \ - --informative-text "Isabelle output" \ - --text-from-file "$OUTPUT" \ - --button1 "OK" -fi - -rm -f "$OUTPUT" - -exit "$RC" diff -r 3514fdfdf59b -r 4de1dd799967 Admin/MacOS/App2/Isabelle.app/Contents/Info.plist --- a/Admin/MacOS/App2/Isabelle.app/Contents/Info.plist Mon Nov 11 20:51:00 2013 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - Isabelle - CFBundleGetInfoString - Isabelle - CFBundleIconFile - isabelle.icns - CFBundleIdentifier - de.tum.in.isabelle - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - Isabelle - CFBundlePackageType - APPL - CFBundleShortVersionString - ???? - CFBundleSignature - ???? - CFBundleVersion - ???? - Java - - JVMVersion - 1.6 - VMOptions - -Xms128m -Xmx512m -Xss2m - ClassPath - $JAVAROOT/isabelle-scala.jar - MainClass - isabelle.GUI_Setup - Properties - - isabelle.home - $APP_PACKAGE/Contents/Resources/Isabelle - apple.laf.useScreenMenuBar - true - com.apple.mrj.application.apple.menu.about.name - Isabelle - - - - diff -r 3514fdfdf59b -r 4de1dd799967 Admin/MacOS/App2/Isabelle.app/Contents/MacOS/Isabelle --- a/Admin/MacOS/App2/Isabelle.app/Contents/MacOS/Isabelle Mon Nov 11 20:51:00 2013 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -/System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub \ No newline at end of file diff -r 3514fdfdf59b -r 4de1dd799967 Admin/MacOS/App2/README --- a/Admin/MacOS/App2/README Mon Nov 11 20:51:00 2013 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -Isabelle/JVM application bundle for MacOS -========================================= - -* http://developer.apple.com/documentation/Java/Conceptual/Java14Development/03-JavaDeployment/JavaDeployment.html - -* http://developer.apple.com/documentation/Java/Reference/Java_InfoplistRef/Articles/JavaDictionaryInfo.plistKeys.html#//apple_ref/doc/uid/TP40001969 - diff -r 3514fdfdf59b -r 4de1dd799967 Admin/MacOS/App2/mk --- a/Admin/MacOS/App2/mk Mon Nov 11 20:51:00 2013 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -# -# Make Isabelle/JVM application bundle - -THIS="$(cd "$(dirname "$0")"; pwd)" - -APP="$THIS/Isabelle.app" - -mkdir -p "$APP/Contents/Resources/Java" -cp "$THIS/../../../lib/classes/isabelle-scala.jar" "$APP/Contents/Resources/Java" -cp "$THIS/../isabelle.icns" "$APP/Contents/Resources" - diff -r 3514fdfdf59b -r 4de1dd799967 Admin/MacOS/App3/Info.plist-part1 --- a/Admin/MacOS/App3/Info.plist-part1 Mon Nov 11 20:51:00 2013 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ - - - - -CFBundleDevelopmentRegion -English -CFBundleExecutable -JavaAppLauncher -CFBundleIconFile -isabelle.icns -CFBundleIdentifier -de.tum.in.isabelle -CFBundleDisplayName -{ISABELLE_NAME} -CFBundleInfoDictionaryVersion -6.0 -CFBundleName -{ISABELLE_NAME} -CFBundlePackageType -APPL -CFBundleShortVersionString -1.0 -CFBundleSignature -???? -CFBundleVersion -1 -NSHumanReadableCopyright - -LSApplicationCategoryType -public.app-category.developer-tools -JVMRuntime -jdk -JVMMainClassName -isabelle.Main -JVMOptions - diff -r 3514fdfdf59b -r 4de1dd799967 Admin/MacOS/App3/Info.plist-part2 --- a/Admin/MacOS/App3/Info.plist-part2 Mon Nov 11 20:51:00 2013 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ --Disabelle.home=$APP_ROOT/Contents/Resources/{ISABELLE_NAME} - -JVMArguments - - - - diff -r 3514fdfdf59b -r 4de1dd799967 Admin/MacOS/App3/README --- a/Admin/MacOS/App3/README Mon Nov 11 20:51:00 2013 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -Isabelle/JVM application bundle for Mac OS X -============================================ - -* http://java.net/projects/appbundler - - see appbundler-1.0.jar - see com/oracle/appbundler/JavaAppLauncher - diff -r 3514fdfdf59b -r 4de1dd799967 Admin/MacOS/App3/Resources/en.lproj/Localizable.strings --- a/Admin/MacOS/App3/Resources/en.lproj/Localizable.strings Mon Nov 11 20:51:00 2013 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -"JRELoadError" = "Unable to load Java Runtime Environment."; -"MainClassNameRequired" = "Main class name is required."; -"JavaDirectoryNotFound" = "Unable to enumerate Java directory contents."; diff -r 3514fdfdf59b -r 4de1dd799967 Admin/MacOS/Info.plist-part1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Admin/MacOS/Info.plist-part1 Mon Nov 11 22:00:57 2013 +0100 @@ -0,0 +1,36 @@ + + + + +CFBundleDevelopmentRegion +English +CFBundleExecutable +JavaAppLauncher +CFBundleIconFile +isabelle.icns +CFBundleIdentifier +de.tum.in.isabelle +CFBundleDisplayName +{ISABELLE_NAME} +CFBundleInfoDictionaryVersion +6.0 +CFBundleName +{ISABELLE_NAME} +CFBundlePackageType +APPL +CFBundleShortVersionString +1.0 +CFBundleSignature +???? +CFBundleVersion +1 +NSHumanReadableCopyright + +LSApplicationCategoryType +public.app-category.developer-tools +JVMRuntime +jdk +JVMMainClassName +isabelle.Main +JVMOptions + diff -r 3514fdfdf59b -r 4de1dd799967 Admin/MacOS/Info.plist-part2 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Admin/MacOS/Info.plist-part2 Mon Nov 11 22:00:57 2013 +0100 @@ -0,0 +1,7 @@ +-Disabelle.home=$APP_ROOT/Contents/Resources/{ISABELLE_NAME} + +JVMArguments + + + + diff -r 3514fdfdf59b -r 4de1dd799967 Admin/MacOS/README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Admin/MacOS/README Mon Nov 11 22:00:57 2013 +0100 @@ -0,0 +1,8 @@ +Isabelle/JVM application bundle for Mac OS X +============================================ + +* http://java.net/projects/appbundler + + see appbundler-1.0.jar + see com/oracle/appbundler/JavaAppLauncher + diff -r 3514fdfdf59b -r 4de1dd799967 Admin/MacOS/Resources/en.lproj/Localizable.strings --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Admin/MacOS/Resources/en.lproj/Localizable.strings Mon Nov 11 22:00:57 2013 +0100 @@ -0,0 +1,3 @@ +"JRELoadError" = "Unable to load Java Runtime Environment."; +"MainClassNameRequired" = "Main class name is required."; +"JavaDirectoryNotFound" = "Unable to enumerate Java directory contents."; diff -r 3514fdfdf59b -r 4de1dd799967 Admin/MacOS/Resources/isabelle.icns Binary file Admin/MacOS/Resources/isabelle.icns has changed diff -r 3514fdfdf59b -r 4de1dd799967 Admin/MacOS/Resources/theory.icns Binary file Admin/MacOS/Resources/theory.icns has changed diff -r 3514fdfdf59b -r 4de1dd799967 Admin/MacOS/isabelle.icns Binary file Admin/MacOS/isabelle.icns has changed diff -r 3514fdfdf59b -r 4de1dd799967 Admin/MacOS/theory.icns Binary file Admin/MacOS/theory.icns has changed diff -r 3514fdfdf59b -r 4de1dd799967 Admin/Windows/launch4j/README --- a/Admin/Windows/launch4j/README Mon Nov 11 20:51:00 2013 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -Java application wrapper for Windows -==================================== - -* http://launch4j.sourceforge.net diff -r 3514fdfdf59b -r 4de1dd799967 Admin/Windows/launch4j/isabelle.ico Binary file Admin/Windows/launch4j/isabelle.ico has changed diff -r 3514fdfdf59b -r 4de1dd799967 Admin/Windows/launch4j/isabelle.xml --- a/Admin/Windows/launch4j/isabelle.xml Mon Nov 11 20:51:00 2013 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ - - true - gui - - Isabelle.exe - - - - normal - - - false - true - - isabelle.ico - - isabelle.Main - %EXEDIR%\lib\classes\ext\Pure.jar - %EXEDIR%\lib\classes\ext\scala-compiler.jar - %EXEDIR%\lib\classes\ext\scala-library.jar - %EXEDIR%\lib\classes\ext\scala-swing.jar - %EXEDIR%\lib\classes\ext\scala-actors.jar - %EXEDIR%\lib\classes\ext\scala-reflect.jar - %EXEDIR%\src\Tools\jEdit\dist\jedit.jar - - - %EXEDIR%\contrib\jdk\x86-cygwin - - - jdkOnly - -Dfile.encoding=UTF-8 -server -Xms128m -Xmx1024m -Xss2m -Dactors.corePoolSize=4 -Dactors.enableForkJoin=false -Disabelle.home="%EXEDIR%" - - - isabelle.bmp - false - 10 - false - - \ No newline at end of file diff -r 3514fdfdf59b -r 4de1dd799967 Admin/lib/Tools/makedist_bundle --- a/Admin/lib/Tools/makedist_bundle Mon Nov 11 20:51:00 2013 +0100 +++ b/Admin/lib/Tools/makedist_bundle Mon Nov 11 22:00:57 2013 +0100 @@ -258,7 +258,7 @@ ( cd "$TMP" - APP_TEMPLATE="$ISABELLE_HOME/Admin/MacOS/App3" + APP_TEMPLATE="$ISABELLE_HOME/Admin/MacOS" APP="${ISABELLE_NAME}.app" for NAME in Java MacOS PlugIns Resources @@ -286,7 +286,6 @@ done cp -R "$APP_TEMPLATE/Resources/." "$APP/Contents/Resources/." - cp "$APP_TEMPLATE/../isabelle.icns" "$APP/Contents/Resources/." ln -sf "../Resources/${ISABELLE_NAME}/contrib/jdk/x86_64-darwin" \ "$APP/Contents/PlugIns/jdk" diff -r 3514fdfdf59b -r 4de1dd799967 src/Doc/IsarImplementation/ML.thy --- a/src/Doc/IsarImplementation/ML.thy Mon Nov 11 20:51:00 2013 +0100 +++ b/src/Doc/IsarImplementation/ML.thy Mon Nov 11 22:00:57 2013 +0100 @@ -1033,7 +1033,7 @@ without any message output. \begin{warn} - The actual error channel is accessed via @{ML Output.error_msg}, but + The actual error channel is accessed via @{ML Output.error_message}, but the old interaction protocol of Proof~General \emph{crashes} if that function is used in regular ML code: error output and toplevel command failure always need to coincide in classic TTY interaction. diff -r 3514fdfdf59b -r 4de1dd799967 src/Pure/Concurrent/future.ML --- a/src/Pure/Concurrent/future.ML Mon Nov 11 20:51:00 2013 +0100 +++ b/src/Pure/Concurrent/future.ML Mon Nov 11 22:00:57 2013 +0100 @@ -447,7 +447,7 @@ Position.setmp_thread_data pos (fn () => let val id = Position.get_id pos in if is_none id orelse is_none exec_id orelse id = exec_id - then Output.error_msg' (serial, msg) else () + then Output.error_message' (serial, msg) else () end) (); fun identify_result pos res = diff -r 3514fdfdf59b -r 4de1dd799967 src/Pure/General/output.ML --- a/src/Pure/General/output.ML Mon Nov 11 20:51:00 2013 +0100 +++ b/src/Pure/General/output.ML Mon Nov 11 22:00:57 2013 +0100 @@ -31,7 +31,7 @@ val urgent_message_fn: (output -> unit) Unsynchronized.ref val tracing_fn: (output -> unit) Unsynchronized.ref val warning_fn: (output -> unit) Unsynchronized.ref - val error_fn: (serial * output -> unit) Unsynchronized.ref + val error_message_fn: (serial * output -> unit) Unsynchronized.ref val prompt_fn: (output -> unit) Unsynchronized.ref val status_fn: (output -> unit) Unsynchronized.ref val report_fn: (output -> unit) Unsynchronized.ref @@ -39,8 +39,8 @@ val protocol_message_fn: (Properties.T -> output -> unit) Unsynchronized.ref end val urgent_message: string -> unit - val error_msg': serial * string -> unit - val error_msg: string -> unit + val error_message': serial * string -> unit + val error_message: string -> unit val prompt: string -> unit val status: string -> unit val report: string -> unit @@ -98,7 +98,8 @@ val urgent_message_fn = Unsynchronized.ref (fn s => ! writeln_fn s); (*Proof General legacy*) val tracing_fn = Unsynchronized.ref (fn s => ! writeln_fn s); val warning_fn = Unsynchronized.ref (physical_writeln o prefix_lines "### "); - val error_fn = Unsynchronized.ref (fn (_: serial, s) => physical_writeln (prefix_lines "*** " s)); + val error_message_fn = + Unsynchronized.ref (fn (_: serial, s) => physical_writeln (prefix_lines "*** " s)); val prompt_fn = Unsynchronized.ref physical_stdout; val status_fn = Unsynchronized.ref (fn _: output => ()); val report_fn = Unsynchronized.ref (fn _: output => ()); @@ -111,8 +112,8 @@ fun urgent_message s = ! Internal.urgent_message_fn (output s); (*Proof General legacy*) fun tracing s = ! Internal.tracing_fn (output s); fun warning s = ! Internal.warning_fn (output s); -fun error_msg' (i, s) = ! Internal.error_fn (i, output s); -fun error_msg s = error_msg' (serial (), s); +fun error_message' (i, s) = ! Internal.error_message_fn (i, output s); +fun error_message s = error_message' (serial (), s); fun prompt s = ! Internal.prompt_fn (output s); fun status s = ! Internal.status_fn (output s); fun report s = ! Internal.report_fn (output s); diff -r 3514fdfdf59b -r 4de1dd799967 src/Pure/General/source.ML --- a/src/Pure/General/source.ML Mon Nov 11 20:51:00 2013 +0100 +++ b/src/Pure/General/source.ML Mon Nov 11 22:00:57 2013 +0100 @@ -156,8 +156,9 @@ NONE => drain (Scan.error scan) inp | SOME (interactive, recover) => (drain (Scan.catch scan) inp handle Fail msg => - (if interactive then Output.error_msg msg else (); - drain (Scan.unless (Scan.lift (Scan.one (Scan.is_stopper stopper))) (recover msg)) inp))); + (if interactive then Output.error_message msg else (); + drain (Scan.unless (Scan.lift (Scan.one (Scan.is_stopper stopper))) (recover msg)) + inp))); in (ys, (state', unget (xs', src'))) end; fun source' init_state stopper scan recover src = diff -r 3514fdfdf59b -r 4de1dd799967 src/Pure/Isar/toplevel.ML --- a/src/Pure/Isar/toplevel.ML Mon Nov 11 20:51:00 2013 +0100 +++ b/src/Pure/Isar/toplevel.ML Mon Nov 11 22:00:57 2013 +0100 @@ -242,7 +242,7 @@ fun program body = (body |> controlled_execution - |> Runtime.toplevel_error (Output.error_msg o ML_Compiler.exn_message)) (); + |> Runtime.toplevel_error ML_Compiler.exn_error_message) (); fun thread interrupts body = Thread.fork diff -r 3514fdfdf59b -r 4de1dd799967 src/Pure/ML/ml_compiler.ML --- a/src/Pure/ML/ml_compiler.ML Mon Nov 11 20:51:00 2013 +0100 +++ b/src/Pure/ML/ml_compiler.ML Mon Nov 11 22:00:57 2013 +0100 @@ -9,6 +9,7 @@ val exn_messages_ids: exn -> Runtime.error list val exn_messages: exn -> (serial * string) list val exn_message: exn -> string + val exn_error_message: exn -> unit val exn_trace: (unit -> 'a) -> 'a val eval: bool -> Position.T -> ML_Lex.token list -> unit end @@ -23,6 +24,8 @@ val exn_messages_ids = Runtime.exn_messages_ids exn_info; val exn_messages = Runtime.exn_messages exn_info; val exn_message = Runtime.exn_message exn_info; + +val exn_error_message = Output.error_message o exn_message; fun exn_trace e = print_exception_trace exn_message e; fun eval verbose pos toks = diff -r 3514fdfdf59b -r 4de1dd799967 src/Pure/ML/ml_compiler_polyml.ML --- a/src/Pure/ML/ml_compiler_polyml.ML Mon Nov 11 20:51:00 2013 +0100 +++ b/src/Pure/ML/ml_compiler_polyml.ML Mon Nov 11 22:00:57 2013 +0100 @@ -36,6 +36,8 @@ val exn_messages_ids = Runtime.exn_messages_ids exn_info; val exn_messages = Runtime.exn_messages exn_info; val exn_message = Runtime.exn_message exn_info; + +val exn_error_message = Output.error_message o exn_message; fun exn_trace e = print_exception_trace exn_message e; @@ -103,7 +105,7 @@ val writeln_buffer = Unsynchronized.ref Buffer.empty; fun write s = Unsynchronized.change writeln_buffer (Buffer.add s); - fun output_writeln () = writeln (Buffer.content (! writeln_buffer)); + fun output_writeln () = writeln (trim_line (Buffer.content (! writeln_buffer))); val warnings = Unsynchronized.ref ([]: string list); fun warn msg = Unsynchronized.change warnings (cons msg); diff -r 3514fdfdf59b -r 4de1dd799967 src/Pure/System/command_line.ML --- a/src/Pure/System/command_line.ML Mon Nov 11 20:51:00 2013 +0100 +++ b/src/Pure/System/command_line.ML Mon Nov 11 22:00:57 2013 +0100 @@ -19,8 +19,8 @@ restore_attributes body () handle exn => let val _ = - Output.error_msg (ML_Compiler.exn_message exn) - handle _ => Output.error_msg "Exception raised, but failed to print details!"; + ML_Compiler.exn_error_message exn + handle _ => Output.error_message "Exception raised, but failed to print details!"; in if Exn.is_interrupt exn then 130 else 1 end; in if rc = 0 then () else exit rc end) (); diff -r 3514fdfdf59b -r 4de1dd799967 src/Pure/System/isabelle_process.ML --- a/src/Pure/System/isabelle_process.ML Mon Nov 11 20:51:00 2013 +0100 +++ b/src/Pure/System/isabelle_process.ML Mon Nov 11 22:00:57 2013 +0100 @@ -119,7 +119,7 @@ Output.Internal.tracing_fn := (fn s => (update_tracing (); standard_message (serial_props ()) Markup.tracingN s)); Output.Internal.warning_fn := (fn s => standard_message (serial_props ()) Markup.warningN s); - Output.Internal.error_fn := + Output.Internal.error_message_fn := (fn (i, s) => standard_message (Markup.serial_properties i) Markup.errorN s); Output.Internal.protocol_message_fn := message Markup.protocolN; Output.Internal.urgent_message_fn := ! Output.Internal.writeln_fn; @@ -167,10 +167,10 @@ fun loop channel = let val continue = (case read_command channel of - [] => (Output.error_msg "Isabelle process: no input"; true) + [] => (Output.error_message "Isabelle process: no input"; true) | name :: args => (worker_guest (fn () => run_command name args); true)) handle Runtime.TERMINATE => false - | exn => (Output.error_msg (ML_Compiler.exn_message exn) handle crash => recover crash; true); + | exn => (ML_Compiler.exn_error_message exn handle crash => recover crash; true); in if continue then loop channel else (Future.shutdown (); Execution.reset (); ()) diff -r 3514fdfdf59b -r 4de1dd799967 src/Pure/System/isar.ML --- a/src/Pure/System/isar.ML Mon Nov 11 20:51:00 2013 +0100 +++ b/src/Pure/System/isar.ML Mon Nov 11 22:00:57 2013 +0100 @@ -97,7 +97,7 @@ | SOME (_, SOME exn_info) => (set_exn (SOME exn_info); Toplevel.setmp_thread_position tr - Output.error_msg' (serial (), ML_Compiler.exn_message (Runtime.EXCURSION_FAIL exn_info)); + ML_Compiler.exn_error_message (Runtime.EXCURSION_FAIL exn_info); true) | SOME (st', NONE) => let @@ -144,7 +144,7 @@ NONE => if secure then quit () else () | SOME (tr, src') => if op >> tr orelse check_secure () then raw_loop secure src' else ()) handle exn => - (Output.error_msg (ML_Compiler.exn_message exn) + (ML_Compiler.exn_error_message exn handle crash => (Synchronized.change crashes (cons crash); warning "Recovering from Isar toplevel crash -- see also Isar.crashes"); diff -r 3514fdfdf59b -r 4de1dd799967 src/Pure/Tools/proof_general.ML --- a/src/Pure/Tools/proof_general.ML Mon Nov 11 20:51:00 2013 +0100 +++ b/src/Pure/Tools/proof_general.ML Mon Nov 11 22:00:57 2013 +0100 @@ -269,7 +269,7 @@ Output.Internal.urgent_message_fn := message (special "I") (special "J") ""; Output.Internal.tracing_fn := message (special "I" ^ special "V") (special "J") ""; Output.Internal.warning_fn := message (special "K") (special "L") "### "; - Output.Internal.error_fn := (fn (_, s) => message (special "M") (special "N") "*** " s); + Output.Internal.error_message_fn := (fn (_, s) => message (special "M") (special "N") "*** " s); Output.Internal.prompt_fn := (fn s => Output.physical_stdout (render s ^ special "S"))); diff -r 3514fdfdf59b -r 4de1dd799967 src/Pure/simplifier.ML --- a/src/Pure/simplifier.ML Mon Nov 11 20:51:00 2013 +0100 +++ b/src/Pure/simplifier.ML Mon Nov 11 22:00:57 2013 +0100 @@ -8,8 +8,6 @@ signature BASIC_SIMPLIFIER = sig include BASIC_RAW_SIMPLIFIER - val Addsimprocs: simproc list -> unit - val Delsimprocs: simproc list -> unit val simp_tac: Proof.context -> int -> tactic val asm_simp_tac: Proof.context -> int -> tactic val full_simp_tac: Proof.context -> int -> tactic @@ -126,16 +124,6 @@ val cong_del = attrib del_cong; -(* global simprocs *) - -fun Addsimprocs args = - Theory.setup (map_theory_simpset (fn ctxt => ctxt addsimprocs args)); - -fun Delsimprocs args = - Theory.setup (map_theory_simpset (fn ctxt => ctxt delsimprocs args)); - - - (** named simprocs **) structure Simprocs = Generic_Data diff -r 3514fdfdf59b -r 4de1dd799967 src/ZF/Datatype_ZF.thy --- a/src/ZF/Datatype_ZF.thy Mon Nov 11 20:51:00 2013 +0100 +++ b/src/ZF/Datatype_ZF.thy Mon Nov 11 22:00:57 2013 +0100 @@ -107,9 +107,10 @@ val conv = Simplifier.simproc_global @{theory} "data_free" ["(x::i) = y"] proc; end; - +*} -Addsimprocs [DataFree.conv]; +setup {* + Simplifier.map_theory_simpset (fn ctxt => ctxt addsimprocs [DataFree.conv]) *} end diff -r 3514fdfdf59b -r 4de1dd799967 src/ZF/arith_data.ML --- a/src/ZF/arith_data.ML Mon Nov 11 20:51:00 2013 +0100 +++ b/src/ZF/arith_data.ML Mon Nov 11 22:00:57 2013 +0100 @@ -221,7 +221,9 @@ end; -Addsimprocs ArithData.nat_cancel; +val _ = + Theory.setup (Simplifier.map_theory_simpset (fn ctxt => + ctxt addsimprocs ArithData.nat_cancel)); (*examples: diff -r 3514fdfdf59b -r 4de1dd799967 src/ZF/int_arith.ML --- a/src/ZF/int_arith.ML Mon Nov 11 20:51:00 2013 +0100 +++ b/src/ZF/int_arith.ML Mon Nov 11 22:00:57 2013 +0100 @@ -320,10 +320,12 @@ end; - -Addsimprocs Int_Numeral_Simprocs.cancel_numerals; -Addsimprocs [Int_Numeral_Simprocs.combine_numerals, - Int_Numeral_Simprocs.combine_numerals_prod]; +val _ = + Theory.setup (Simplifier.map_theory_simpset (fn ctxt => + ctxt addsimprocs + (Int_Numeral_Simprocs.cancel_numerals @ + [Int_Numeral_Simprocs.combine_numerals, + Int_Numeral_Simprocs.combine_numerals_prod]))); (*examples:*)