Re: suppressing compiler output

John Reppy <[email protected]>
Newsgroups gmane.comp.lang.sml.smlnj
Message-ID <[email protected]>
Another approach might be to rebind TextIO.stdOut and TextIO.stdErr  
to null streams.
Something like the following should work:

	let
	val null = TextIO.getOutStream(TextIO.openOut "/dev/null")
	in
	  TextIO.setOutstream(TextIO.stdOut, null);
	  TextIO.setOutstream(TextIO.stdErr, null)
	end

On Nov 27, 2006, at 7:31 AM, Buday, Gergely Istvan wrote:

> Hi,
>
> I'd like to suppress compiler output. What I have, following  
> smlnj.org is
>
> sml <<EOF
> Control.Print.out := {say=fn _=>(), flush=fn()=>()};
> CM.make("sources.cm");
> Main.doit();
> EOF
> in my script (I would like to imitate #!/usr/local/bin/sml) but  
> that does display some autoloading information:
>
> [library $smlnj/compiler/current.cm is stable]
> [library $smlnj/compiler/sparc.cm is stable]
> [library $smlnj/viscomp/core.cm is stable]
> [...]
>
> Is it possible not to have these without hacking the compiler?
>
> Best Wishes
>
> - Gergely
> ---------------------------------------------------------------------- 
> ---
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to  
> share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php? 
> page=join.php&p=sourceforge&CID=DEVDEV________________________________ 
> _______________
> Smlnj-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/smlnj-list


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.