<div dir="ltr">The script itself looks pretty good to me, but you might want to take a look at <a href="https://hackage.haskell.org/package/shelly">Shelly</a> [0] for Haskell scripting in the future. It's a really nice library / DSL for "bash"-like scripting directly in Haskell. If you try out Shelly, I suggest trying it with ClassyPrelude and -XOverloadedStrings, which makes dealing with all the Text and FilePath types bearable. (Heh, though it's annoying, having FilePath as a separate type once prevented me from writing code that deleted my home directory upon being run... fun story.)<div>

<br></div><div>[0] <a href="https://hackage.haskell.org/package/shelly">https://hackage.haskell.org/package/shelly</a></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Apr 5, 2014 at 4:33 AM, Kim-Ee Yeoh <span dir="ltr"><<a href="mailto:ky3@atamo.com" target="_blank">ky3@atamo.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class=""><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Apr 5, 2014 at 5:21 PM, Robert Vollmert <span dir="ltr"><<a href="mailto:rvollmert-lists@gmx.net" target="_blank">rvollmert-lists@gmx.net</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
- clobbering the environment by prepending to an association list makes me wonder if that’s really what happens when the variable is already defined</blockquote></div><br></div></div><div class="gmail_extra">Yes, that does raise flags.<br>



<br></div><div class="gmail_extra">The haskell here:<br><br></div><div class="gmail_extra"><div>    installEnv <span><-</span> getEnvironment <span>>>=</span> <span>return</span> <span>.</span> <span>(</span>:<span>)</span> <span>(</span><span>"GOBIN"</span><span>,</span> gOBIN<span>)</span></div>



</div><div class="gmail_extra"><br></div><div class="gmail_extra">which I'd probably write as<br></div><div class="gmail_extra"><br>    installEnv <span><-</span> <span>(</span><span>("GOBIN"</span><span>,</span> gOBIN<span>) :) <$> </span>getEnvironment<span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><br>



<br>doesn't match the python here:<br><div class="gmail_extra"><br></div>    GOBIN <span>=</span> <span>tempfile</span>.<span>gettempdir</span><span>(</span><span>)</span><div>

<span>    os</span>.<span>environ</span><span>[</span><span>'GOBIN'</span><span>]</span> <span>=</span> GOBIN</div><br></div><div class="gmail_extra">in the sense that the case for a predefined GOBIN in the environment will lead to different results. At least I'll be surprised if otherwise.<br>



</div><div class="gmail_extra"><br><div class="gmail_extra"><div><span></span>To Matt: have you tested your haskell version? You might want to take a look at System.Posix.Env.putenv.<span class="HOEnZb"><font color="#888888"><br>

</font></span></div></div></div><span class="HOEnZb"><font color="#888888">

<div class="gmail_extra"><br clear="all"><div>-- Kim-Ee</div>
</div></font></span></div>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br></div>