src/Pure/ML-Systems/polyml-3.x.ML
author berghofe
Fri, 16 Apr 2004 18:44:39 +0200
changeset 14597 ee0fb03f5f1e
parent 12988 2112f9e337bb
permissions -rw-r--r--
Added translate function to String structure.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11063
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
     1
(*  Title:      Pure/ML-Systems/polyml.ML
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
     2
    ID:         $Id$
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
     4
    Copyright   1991  University of Cambridge
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
     5
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
     6
Compatibility file for Poly/ML (versions 2.x and 3.x).
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
     7
*)
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
     8
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
     9
open PolyML ExtendedIO;
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    10
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    11
(*needs the Basis Library emulation*)
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    12
use "basis.ML";
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    13
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    14
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    15
structure String =
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    16
struct
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    17
  fun substring (s,i,j) = StringBuiltIns.substring (s, i+1, j)
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    18
                          handle Substring => raise Subscript
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    19
  fun isPrefix s1 s2 = (s1 = substring(s2,0, size s1))
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    20
                       handle Subscript => false
14597
ee0fb03f5f1e Added translate function to String structure.
berghofe
parents: 12988
diff changeset
    21
  fun str (s : string) = s;
ee0fb03f5f1e Added translate function to String structure.
berghofe
parents: 12988
diff changeset
    22
  fun translate f s = implode (map f (explode s));
11063
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    23
end;
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    24
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    25
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    26
(** ML system related **)
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    27
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    28
(** Compiler-independent timing functions **)
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    29
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    30
(*Note start point for timing*)
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    31
fun startTiming() = System.processtime ();
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    32
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    33
(*Finish timing and return string*)
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    34
fun endTiming before =
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    35
  "User + GC: " ^
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    36
  makestring (real (System.processtime () - before) / 10.0) ^
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    37
  " secs";
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    38
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    39
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    40
(* prompts *)
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    41
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    42
fun ml_prompts p1 p2 = (PolyML.Compiler.prompt1 := p1; PolyML.Compiler.prompt2 := p2);
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    43
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    44
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    45
(* toplevel pretty printing (see also Pure/install_pp.ML) *)
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    46
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    47
fun make_pp _ pprint (str, blk, brk, en) obj =
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    48
  pprint obj (str, fn ind => blk (ind, false), fn wd => brk (wd, 0),
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    49
    fn () => brk (99999, 0), en);
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    50
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    51
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    52
(* ML command execution -- 'eval' *)
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    53
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    54
local
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    55
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    56
fun drop_last [] = []
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    57
  | drop_last [x] = []
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    58
  | drop_last (x :: xs) = x :: drop_last xs;
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    59
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    60
val drop_last_char = implode o drop_last o explode;
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    61
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    62
in
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    63
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    64
fun use_text (print, err) verbose txt =
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    65
  let
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    66
    val in_buffer = ref (explode txt);
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    67
    val out_buffer = ref ([]: string list);
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    68
    fun output () = drop_last_char (implode (rev (! out_buffer)));
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    69
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    70
    fun get () =
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    71
      (case ! in_buffer of
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    72
        [] => ""
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    73
      | c :: cs => (in_buffer := cs; c));
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    74
    fun put s = out_buffer := s :: ! out_buffer;
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    75
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    76
    fun exec () =
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    77
      (case ! in_buffer of
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    78
        [] => ()
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    79
      | _ => (PolyML.compiler (get, put) (); exec ()));
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    80
  in
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    81
    exec () handle exn => (err (output ()); raise exn);
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    82
    if verbose then print (output ()) else ()
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    83
  end;
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    84
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    85
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    86
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    87
(** interrupts **)      (*Note: may get into race conditions*)
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    88
12988
2112f9e337bb renamed mask_interrupt to ignore_interrupt;
wenzelm
parents: 12896
diff changeset
    89
fun ignore_interrupt f x = f x;
2112f9e337bb renamed mask_interrupt to ignore_interrupt;
wenzelm
parents: 12896
diff changeset
    90
fun raise_interrupt f x = f x;
11063
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    91
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    92
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    93
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    94
(** OS related **)
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    95
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    96
(* system command execution *)
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    97
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    98
(*execute Unix command which doesn't take any input from stdin and
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
    99
  sends its output to stdout*)
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   100
fun execute command =
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   101
  let
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   102
    val (is, os) =  ExtendedIO.execute command;
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   103
    val _ = close_out os;
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   104
    val result = input (is, 999999);
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   105
  in close_in is; result end;
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   106
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   107
fun system cmd = (print (execute cmd); 0);	(* FIXME rc not available *)
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   108
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   109
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   110
(* file handling *)
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   111
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   112
(*get time of last modification*)
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   113
fun file_info name = Int.toString (System.filedate name) handle _ => "";
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   114
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   115
structure OS =
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   116
struct
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   117
  structure FileSys =
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   118
  struct
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   119
    val chDir = PolyML.cd;
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   120
    fun remove name = (execute ("rm " ^ name); ());
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   121
    fun getDir () = drop_last_char (execute "pwd");
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   122
  end;
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   123
end;
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   124
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   125
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   126
(* getenv *)
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   127
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   128
fun getenv var = drop_last_char
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   129
  (execute ("env | grep '^" ^ var ^ "=' | sed -e 's/" ^ var ^ "=//'"));
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   130
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   131
82578cdb76cf renamed polyml.ML to polyml-3.x.ML and polyml-4.0.ML to polyml.ML (default);
wenzelm
parents:
diff changeset
   132
end;