<br><font size=2 face="sans-serif">this works. now if only there were a
&quot;quiet&quot; option for ghci...</font>
<br>
<br><font size=2 face="sans-serif">well, for me, I guess this may be goodbye
to poor sad undocumented malfunctioning runghc..</font>
<br>
<br><font size=2 face="sans-serif">hartthoma@linuxpt:~/personal/PersonalRepos/pharchive/learning/haskell/UnixTools/arghandling&gt;echo
&quot;:main 1 2 3&quot; | /usr/local/bin/ghci-6.6.1 arghandling-nice.hs</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp;___ &nbsp; &nbsp; &nbsp;
&nbsp; ___ _</font>
<br><font size=2 face="sans-serif">&nbsp; / _ \ /\ &nbsp;/\/ __(_)</font>
<br><font size=2 face="sans-serif">&nbsp;/ /_\// /_/ / / &nbsp;| | &nbsp;
&nbsp; &nbsp;GHC Interactive, version 6.6.1, for Haskell 98.</font>
<br><font size=2 face="sans-serif">/ /_\\/ __ &nbsp;/ /___| | &nbsp; &nbsp;
&nbsp;http://www.haskell.org/ghc/</font>
<br><font size=2 face="sans-serif">\____/\/ /_/\____/|_| &nbsp; &nbsp;
&nbsp;Type :? for help.</font>
<br>
<br><font size=2 face="sans-serif">Loading package base ... linking ...
done.</font>
<br><font size=2 face="sans-serif">[1 of 1] Compiling Main &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; ( arghandling-nice.hs, interpreted )</font>
<br><font size=2 face="sans-serif">Ok, modules loaded: Main.</font>
<br><font size=2 face="sans-serif">*Main&gt; Loading package haskell98
... linking ... done.</font>
<br><font size=2 face="sans-serif">&quot;1 2 3&quot;</font>
<br><font size=2 face="sans-serif">*Main&gt; Leaving GHCi.</font>
<br>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Thomas Hartman &lt;thomas.hartman+external@db.com&gt;</b>
</font>
<br><font size=1 face="sans-serif">Sent by: haskell-cafe-bounces@haskell.org</font>
<p><font size=1 face="sans-serif">08/22/2007 01:38 PM</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">&quot;haskell-cafe@haskell.org&quot;
&lt;haskell-cafe@haskell.org&gt;</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">[Haskell-cafe] -f flag to runghc broken,
or is it just me? (because trying switch elegantly between ghc 6.6 and
ghc 6.7)</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2 face="sans-serif"><br>
I'm doing a lot of switching between ghc 6.6 and ghc 6.7 on the same computer.
I install modules using</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
 &nbsp;$ runghc Setup.hs configure <br>
 &nbsp; &nbsp;etc.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
I would like to specify which version of ghc should be getting the package
installed via the f flag to runghc</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
 &nbsp;$ :~/personal/PersonalRepos/pharchive/learning/haskell/UnixTools/arghandling&gt;runghc</font><font size=3>
</font><font size=2 face="sans-serif"><br>
 &nbsp;runghc: syntax: runghc [-f GHCPATH] [GHC-ARGS] FILE ARG...</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
but this appears to be broken.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
 &nbsp;$ :~/personal/PersonalRepos/pharchive/learning/haskell/UnixTools/arghandling&gt;runghc
arghandling-nice.hs</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp;arghandling-nice.hs: args length does not equal 3. args: : []</font><font size=3>
</font><font size=2 face="sans-serif"><br>
 &nbsp;usage example: $ runghc arghandling-nice.hs firstarg secondarg thirdarg</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
without the flag works but </font><font size=3><br>
</font><font size=2 face="sans-serif"><br>
 &nbsp;$ :~/personal/PersonalRepos/pharchive/learning/haskell/UnixTools/arghandling&gt;runghc
-f /usr/local/bin/ghc-6.6.1 &nbsp;arghandling-nice.hs</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
does nothing.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
$ :~/personal/PersonalRepos/pharchive/learning/haskell/UnixTools/arghandling&gt;ls
-l /usr/local/bin/ghc-6.6.1</font><font size=3> </font><font size=2 face="sans-serif"><br>
-rwxr-xr-x 1 root root 151 2007-06-16 20:22 /usr/local/bin/ghc-6.6.1</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
In general I don't like using runghc because it doesn't appear to be documented
anywhere except that (incorrect?) usage message. Is there a way to do a
package install just using ghc -e? (Sure I could compile, but it helps
me sometimes if I can not, a la runghc.) At any rate I couldn't figure
out how to pass arguments to main via ghc -e.</font><font size=3> <br>
<br>
<br>
</font><font size=2 face="sans-serif"><br>
 &nbsp;$ :~/personal/PersonalRepos/pharchive/learning/haskell/UnixTools/arghandling&gt;cat
arghandling-nice.hs</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp;import System</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
 &nbsp;main = do args &lt;- getArgs</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;let usagemsg = &quot;usage example:
$ runghc arghandling-nice.hs firstarg secondarg thirdarg&quot;</font><font size=3>
</font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case args of</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[first,second,third] -&gt; process
first second third</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_ &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-&gt; error $ &quot;args length
does not equal 3. args: : &quot; ++ ( show args ) ++ &quot;\n&quot; ++
usagemsg</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
 &nbsp;process a b c = print $ unwords [a,b,c]</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
Thanks for anybody who can help me out with this.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
Thomas.</font><font size=3> </font><font size=2 face="sans-serif"><br>
---</font><font size=3><br>
</font><font size=2 face="sans-serif"><br>
This e-mail may contain confidential and/or privileged information. If
you <br>
are not the intended recipient (or have received this e-mail in error)
<br>
please notify the sender immediately and destroy this e-mail. Any <br>
unauthorized copying, disclosure or distribution of the material in this
<br>
e-mail is strictly forbidden.</font><tt><font size=2>_______________________________________________<br>
Haskell-Cafe mailing list<br>
Haskell-Cafe@haskell.org<br>
http://www.haskell.org/mailman/listinfo/haskell-cafe<br>
</font></tt>
<br>
<br>
<span style="font-family:sans-serif,helvetica; font-size:10pt; color:#000000">---</span><br>
<br>
<span style="font-family:sans-serif,helvetica; font-size:10pt; color:#000000">This e-mail may contain confidential and/or privileged information. If you </span><br>
<span style="font-family:sans-serif,helvetica; font-size:10pt; color:#000000">are not the intended recipient (or have received this e-mail in error) </span><br>
<span style="font-family:sans-serif,helvetica; font-size:10pt; color:#000000">please notify the sender immediately and destroy this e-mail. Any </span><br>
<span style="font-family:sans-serif,helvetica; font-size:10pt; color:#000000">unauthorized copying, disclosure or distribution of the material in this </span><br>
<span style="font-family:sans-serif,helvetica; font-size:10pt; color:#000000">e-mail is strictly forbidden.</span><br>