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 82, Sun May 3 00:00:24 1998 UTC revision 83, Wed May 6 22:23:51 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 *)    fun useStreamSilently (name, stream) =
33        let val home = valOf (OS.Process.getEnv "HOME")        let (* use the usual evalloop params, but substitute a
34            val rcfile = ".smlnjrc"             * pretty-printer that does nothing.
           val rcpath = OS.Path.joinDirFile {dir=home, file=rcfile}  
           val rcin = TextIO.openIn rcpath  
           (* when reading the rc file, we use the usual evalloop  
            * params, but we substitute a pretty-printer that  
            * does nothing, so that we get rid of gross  
            * `val it = () : unit' everywhere.  
35             *)             *)
36            val {compManagerHook,            val {compManagerHook,
37                 baseEnvRef,                 baseEnvRef,
# Line 58  Line 52 
52                 printer = fn _ => fn _ => fn _ => () (* no-op printer *)                 printer = fn _ => fn _ => fn _ => () (* no-op printer *)
53                 }                 }
54        in        in
55            EvalLoop.evalStream params (rcpath, rcin)            EvalLoop.evalStream params (name, stream)
56        end        end
           handle Option => ()  
                | IO.Io _ => ()  
57    
58    fun evalStream (stream: TextIO.instream, baseEnv: SCEnv.Env.environment) :    fun evalStream (stream: TextIO.instream, baseEnv: SCEnv.Env.environment) :
59        SCEnv.Env.environment =        SCEnv.Env.environment =

Legend:
Removed from v.82  
changed lines
  Added in v.83

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