--- 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
-
--- 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
--- 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"
--- 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 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>Isabelle</string>
- <key>CFBundleGetInfoString</key>
- <string>Isabelle</string>
- <key>CFBundleIconFile</key>
- <string>isabelle.icns</string>
- <key>CFBundleIdentifier</key>
- <string>de.tum.in.isabelle</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>Isabelle</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>????</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>????</string>
- <key>Java</key>
- <dict>
- <key>JVMVersion</key>
- <string>1.6</string>
- <key>VMOptions</key>
- <string>-Xms128m -Xmx512m -Xss2m</string>
- <key>ClassPath</key>
- <string>$JAVAROOT/isabelle-scala.jar</string>
- <key>MainClass</key>
- <string>isabelle.GUI_Setup</string>
- <key>Properties</key>
- <dict>
- <key>isabelle.home</key>
- <string>$APP_PACKAGE/Contents/Resources/Isabelle</string>
- <key>apple.laf.useScreenMenuBar</key>
- <string>true</string>
- <key>com.apple.mrj.application.apple.menu.about.name</key>
- <string>Isabelle</string>
- </dict>
- </dict>
-</dict>
-</plist>
--- 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
--- 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
-
--- 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"
-
--- 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 @@
-<?xml version="1.0" ?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-<key>CFBundleDevelopmentRegion</key>
-<string>English</string>
-<key>CFBundleExecutable</key>
-<string>JavaAppLauncher</string>
-<key>CFBundleIconFile</key>
-<string>isabelle.icns</string>
-<key>CFBundleIdentifier</key>
-<string>de.tum.in.isabelle</string>
-<key>CFBundleDisplayName</key>
-<string>{ISABELLE_NAME}</string>
-<key>CFBundleInfoDictionaryVersion</key>
-<string>6.0</string>
-<key>CFBundleName</key>
-<string>{ISABELLE_NAME}</string>
-<key>CFBundlePackageType</key>
-<string>APPL</string>
-<key>CFBundleShortVersionString</key>
-<string>1.0</string>
-<key>CFBundleSignature</key>
-<string>????</string>
-<key>CFBundleVersion</key>
-<string>1</string>
-<key>NSHumanReadableCopyright</key>
-<string></string>
-<key>LSApplicationCategoryType</key>
-<string>public.app-category.developer-tools</string>
-<key>JVMRuntime</key>
-<string>jdk</string>
-<key>JVMMainClassName</key>
-<string>isabelle.Main</string>
-<key>JVMOptions</key>
-<array>
--- 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 @@
-<string>-Disabelle.home=$APP_ROOT/Contents/Resources/{ISABELLE_NAME}</string>
-</array>
-<key>JVMArguments</key>
-<array>
-</array>
-</dict>
-</plist>
--- 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
-
--- 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.";
--- /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 @@
+<?xml version="1.0" ?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+<key>CFBundleDevelopmentRegion</key>
+<string>English</string>
+<key>CFBundleExecutable</key>
+<string>JavaAppLauncher</string>
+<key>CFBundleIconFile</key>
+<string>isabelle.icns</string>
+<key>CFBundleIdentifier</key>
+<string>de.tum.in.isabelle</string>
+<key>CFBundleDisplayName</key>
+<string>{ISABELLE_NAME}</string>
+<key>CFBundleInfoDictionaryVersion</key>
+<string>6.0</string>
+<key>CFBundleName</key>
+<string>{ISABELLE_NAME}</string>
+<key>CFBundlePackageType</key>
+<string>APPL</string>
+<key>CFBundleShortVersionString</key>
+<string>1.0</string>
+<key>CFBundleSignature</key>
+<string>????</string>
+<key>CFBundleVersion</key>
+<string>1</string>
+<key>NSHumanReadableCopyright</key>
+<string></string>
+<key>LSApplicationCategoryType</key>
+<string>public.app-category.developer-tools</string>
+<key>JVMRuntime</key>
+<string>jdk</string>
+<key>JVMMainClassName</key>
+<string>isabelle.Main</string>
+<key>JVMOptions</key>
+<array>
--- /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 @@
+<string>-Disabelle.home=$APP_ROOT/Contents/Resources/{ISABELLE_NAME}</string>
+</array>
+<key>JVMArguments</key>
+<array>
+</array>
+</dict>
+</plist>
--- /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
+
--- /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.";
Binary file Admin/MacOS/Resources/isabelle.icns has changed
Binary file Admin/MacOS/Resources/theory.icns has changed
Binary file Admin/MacOS/isabelle.icns has changed
Binary file Admin/MacOS/theory.icns has changed
--- 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
Binary file Admin/Windows/launch4j/isabelle.ico has changed
--- 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 @@
-<launch4jConfig>
- <dontWrapJar>true</dontWrapJar>
- <headerType>gui</headerType>
- <jar></jar>
- <outfile>Isabelle.exe</outfile>
- <errTitle></errTitle>
- <cmdLine></cmdLine>
- <chdir></chdir>
- <priority>normal</priority>
- <downloadUrl></downloadUrl>
- <supportUrl></supportUrl>
- <customProcName>false</customProcName>
- <stayAlive>true</stayAlive>
- <manifest></manifest>
- <icon>isabelle.ico</icon>
- <classPath>
- <mainClass>isabelle.Main</mainClass>
- <cp>%EXEDIR%\lib\classes\ext\Pure.jar</cp>
- <cp>%EXEDIR%\lib\classes\ext\scala-compiler.jar</cp>
- <cp>%EXEDIR%\lib\classes\ext\scala-library.jar</cp>
- <cp>%EXEDIR%\lib\classes\ext\scala-swing.jar</cp>
- <cp>%EXEDIR%\lib\classes\ext\scala-actors.jar</cp>
- <cp>%EXEDIR%\lib\classes\ext\scala-reflect.jar</cp>
- <cp>%EXEDIR%\src\Tools\jEdit\dist\jedit.jar</cp>
- </classPath>
- <jre>
- <path>%EXEDIR%\contrib\jdk\x86-cygwin</path>
- <minVersion></minVersion>
- <maxVersion></maxVersion>
- <jdkPreference>jdkOnly</jdkPreference>
- <opt>-Dfile.encoding=UTF-8 -server -Xms128m -Xmx1024m -Xss2m -Dactors.corePoolSize=4 -Dactors.enableForkJoin=false -Disabelle.home="%EXEDIR%"</opt>
- </jre>
- <splash>
- <file>isabelle.bmp</file>
- <waitForWindow>false</waitForWindow>
- <timeout>10</timeout>
- <timeoutErr>false</timeoutErr>
- </splash>
-</launch4jConfig>
\ No newline at end of file
--- 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"
--- 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.
--- 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 =
--- 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);
--- 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 =
--- 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
--- 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 =
--- 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);
--- 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) ();
--- 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 (); ())
--- 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");
--- 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")));
--- 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
--- 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
--- 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:
--- 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:*)