Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/src/compiler/TopLevel/interact/interact.sml
ViewVC logotype

Diff of /sml/trunk/src/compiler/TopLevel/interact/interact.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 78, Fri Apr 17 17:58:14 1998 UTC revision 79, Sat Apr 18 00:19:45 1998 UTC
# Line 29  Line 29 
29    fun useStream (stream: TextIO.instream) =    fun useStream (stream: TextIO.instream) =
30      EvalLoop.evalStream EvalLoop.stdParams ("<instream>", stream)      EvalLoop.evalStream EvalLoop.stdParams ("<instream>", stream)
31    
32      fun initialize () = (* read $HOME/.smlnjrc, if it exists *)
33          let val home = valOf (OS.Process.getEnv "HOME")
34              val rcfile = ".smlnjrc"
35              val rcpath = OS.Path.joinDirFile {dir=home, file=rcfile}
36              val rcin = TextIO.openIn rcpath
37              (* when reading the rc file, we use the usual evalloop
38               * params, but we substitute a pretty-printer that
39               * does nothing, so that we get rid of gross
40               * `val it = () : unit' everywhere.
41               *)
42              val {compManagerHook,
43                   baseEnvRef,
44                   localEnvRef,
45                   transform,
46                   instrument,
47                   perform,
48                   isolate,...} = EvalLoop.stdParams
49    
50              val params : EvalLoop.interactParams =
51                  {compManagerHook = compManagerHook,
52                   baseEnvRef = baseEnvRef,
53                   localEnvRef = localEnvRef,
54                   transform = transform,
55                   instrument = instrument,
56                   perform = perform,
57                   isolate = isolate,
58                   printer = fn _ => fn _ => fn _ => () (* no-op printer *)
59                   }
60          in
61              EvalLoop.evalStream params (rcpath, rcin)
62          end
63              handle Option => ()
64                   | IO.Io _ => ()
65    
66    fun evalStream (stream: TextIO.instream, baseEnv: SCEnv.Env.environment) :    fun evalStream (stream: TextIO.instream, baseEnv: SCEnv.Env.environment) :
67        SCEnv.Env.environment =        SCEnv.Env.environment =
68        let val r = ref Environment.emptyEnv        let val r = ref Environment.emptyEnv

Legend:
Removed from v.78  
changed lines
  Added in v.79

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0