Add standalone file to help porters
authoraspinall
Sun, 31 Dec 2006 15:57:58 +0100
changeset 21974 c4e4d34fbc60
parent 21973 e7c9b0d3ce82
child 21975 1152dc45d591
Add standalone file to help porters
src/Pure/ProofGeneral/pgip_standalone.ML
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Pure/ProofGeneral/pgip_standalone.ML	Sun Dec 31 15:57:58 2006 +0100
@@ -0,0 +1,55 @@
+(*  Title:      Pure/ProofGeneral/pgip.ML
+    ID:         $Id$
+    Author:     David Aspinall
+
+   This file allows a standalone build of the PGIP abstraction module.
+
+   This should be useful for building other tools, or as an aid to porting.
+
+   A lot of Isabelle library code is pulled in, but only a few
+   functions are actually used, and the libraries indicated "used
+   directly" below could be replaced with other implementations.
+
+   NB: This is *not* part of the Isabelle build.  As such, it's
+   liable to breakage as library functions are changed or moved around.
+*)
+
+val cd = OS.FileSys.chDir;
+cd ".."; 
+
+(* First you have to setup for your ML compiler.
+   This even requires extracting a function from the bash scripts! 
+   See lib/scripts/run-XXX.  This is for polyML 4.2.0. 
+*)
+fun exit 0 = (OS.Process.exit OS.Process.success): unit 
+  | exit _ = OS.Process.exit OS.Process.failure;
+use "ML-Systems/polyml-4.2.0.ML";
+
+(* Now the required parts of Isabelle libraries *)
+
+use "General/basics.ML";
+use "library.ML";
+use "General/position.ML";
+use "General/path.ML";     (* used directly *)
+use "General/table.ML";
+use "General/alist.ML";
+use "General/output.ML";
+use "General/scan.ML";
+use "General/source.ML";
+use "General/file.ML";     (* used directly *)
+use "General/buffer.ML";
+use "General/symbol.ML";  
+use "General/xml.ML";      (* used directly *)
+use "General/url.ML";      (* used directly *)
+
+cd "ProofGeneral/";
+
+use "syntax_standalone.ML"; 
+
+(* Finally, our code *)
+
+use "pgip_types.ML";
+use "pgip_markup.ML";
+use "pgip_input.ML";
+use "pgip_output.ML";
+use "pgip.ML";