<p dir="ltr">But do you really want to do this? </p>
<p dir="ltr">It seems to me you don't want to keep using your stage0 while working on ghc. As you don't want to break it and spend hours wondering why your build failed.</p>
<p dir="ltr">Fair enough, if people want to do this. So long as it's not the defacto method.</p>
<br><div class="gmail_quote"><div dir="ltr">On Thu, 26 Jan 2017, 17:28 Matthew Pickering, <<a href="mailto:matthewtpickering@gmail.com">matthewtpickering@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think the intention is that if you are already using stack to manage<br class="gmail_msg">
your GHC installations then it is desirable to use their managed<br class="gmail_msg">
version of GHC rather than have to install another version.<br class="gmail_msg">
<br class="gmail_msg">
It seems to me that the solution that Harendra suggests is the easiest<br class="gmail_msg">
for anyone with this setup.<br class="gmail_msg">
<br class="gmail_msg">
Fwiw, the easiest way I found to setup a clean development environment<br class="gmail_msg">
for GHC was to use the nix ghcHEAD derviation.<br class="gmail_msg">
<br class="gmail_msg">
   nix-shell '<nixpkgs>' -A haskell.compiler.ghcHEAD<br class="gmail_msg">
<br class="gmail_msg">
but of course, this only works if you are using nix!<br class="gmail_msg">
<br class="gmail_msg">
Matt<br class="gmail_msg">
<br class="gmail_msg">
On Thu, Jan 26, 2017 at 5:18 PM, Phyx <<a href="mailto:lonetiger@gmail.com" class="gmail_msg" target="_blank">lonetiger@gmail.com</a>> wrote:<br class="gmail_msg">
> Can I ask a silly question. I can't seem to find where stack is recommended<br class="gmail_msg">
> for ghc development on the newcomers page, but why is it? I don't want to<br class="gmail_msg">
> start another flame war but I can't imagine any scenario where this is<br class="gmail_msg">
> useful. As far as I understand the whole benefit of stack is the curated<br class="gmail_msg">
> packages.<br class="gmail_msg">
><br class="gmail_msg">
> Which are moot here since almost everything you need is in the tree aside<br class="gmail_msg">
> from Happy and Alex. Seems to me this is just overcomplicating a very simple<br class="gmail_msg">
> process.<br class="gmail_msg">
><br class="gmail_msg">
> Not to mention if you have to go through stack - - exec etc all for<br class="gmail_msg">
> interactions with the build artifacts it would get old quickly. Also it<br class="gmail_msg">
> doesn't seem reliable especially if stack is modifying the environment and<br class="gmail_msg">
> or flags passed to the compiler.<br class="gmail_msg">
><br class="gmail_msg">
> Let me reiterate, I have nothing against stack, I just don't see the<br class="gmail_msg">
> benefits here. Ideally you'd want your environment as simple and vanilla as<br class="gmail_msg">
> possible and *totally* in your control IMHO.<br class="gmail_msg">
><br class="gmail_msg">
> What am I missing here?<br class="gmail_msg">
><br class="gmail_msg">
> Thanks,<br class="gmail_msg">
> Tamar<br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
> On Thu, 26 Jan 2017, 14:21 Harendra Kumar, <<a href="mailto:harendra.kumar@gmail.com" class="gmail_msg" target="_blank">harendra.kumar@gmail.com</a>> wrote:<br class="gmail_msg">
>><br class="gmail_msg">
>> I use "export PATH=`stack path --bin-path`" to make the stack installed<br class="gmail_msg">
>> ghc available in the PATH before building ghc. And that's all.<br class="gmail_msg">
>><br class="gmail_msg">
>> Setting the PATH works better because we do not get any extra env<br class="gmail_msg">
>> variables set by stack in the environment and we do not go through the stack<br class="gmail_msg">
>> wrapper, so it may be a little bit faster as well. The GHC_PACKAGE_PATH<br class="gmail_msg">
>> variable set by the stack command is especially troublesome in some cases.<br class="gmail_msg">
>> You can try "stack exec env" to check all vars that stack puts in your<br class="gmail_msg">
>> environment.<br class="gmail_msg">
>><br class="gmail_msg">
>> -harendra<br class="gmail_msg">
>><br class="gmail_msg">
>> On 26 January 2017 at 15:52, Marius Ghita <<a href="mailto:mhitza@gmail.com" class="gmail_msg" target="_blank">mhitza@gmail.com</a>> wrote:<br class="gmail_msg">
>>><br class="gmail_msg">
>>> Following is a list of steps that I ran and their output linked:<br class="gmail_msg">
>>><br class="gmail_msg">
>>>  - clone repo<br class="gmail_msg">
>>> <a href="https://gist.github.com/mhitza/f5d4516b6c8386fe8e064f95b5ad620b" rel="noreferrer" class="gmail_msg" target="_blank">https://gist.github.com/mhitza/f5d4516b6c8386fe8e064f95b5ad620b</a><br class="gmail_msg">
>>>  - <a href="http://build.mk" rel="noreferrer" class="gmail_msg" target="_blank">build.mk</a> configuration<br class="gmail_msg">
>>> <a href="https://gist.github.com/mhitza/2d979c64a646bdd3e097f65fd650c675" rel="noreferrer" class="gmail_msg" target="_blank">https://gist.github.com/mhitza/2d979c64a646bdd3e097f65fd650c675</a><br class="gmail_msg">
>>>  - boot <a href="https://gist.github.com/mhitza/e23df8b9ed2aac5b1b8881c70165bf3f" rel="noreferrer" class="gmail_msg" target="_blank">https://gist.github.com/mhitza/e23df8b9ed2aac5b1b8881c70165bf3f</a><br class="gmail_msg">
>>>  - configure<br class="gmail_msg">
>>> <a href="https://gist.github.com/mhitza/88c09179be3bb82024192bf6181aef13" rel="noreferrer" class="gmail_msg" target="_blank">https://gist.github.com/mhitza/88c09179be3bb82024192bf6181aef13</a><br class="gmail_msg">
>>>  - make FAILS<br class="gmail_msg">
>>> <a href="https://gist.github.com/mhitza/95738bf49c8c87ce46c9319b4c266a2c" rel="noreferrer" class="gmail_msg" target="_blank">https://gist.github.com/mhitza/95738bf49c8c87ce46c9319b4c266a2c</a><br class="gmail_msg">
>>><br class="gmail_msg">
>>> I'm using a 'stack-ghc' executable, that's only a shell wrapper to run<br class="gmail_msg">
>>> ghc from stack (since I don't have a globally installed ghc) (source<br class="gmail_msg">
>>> <a href="https://gist.github.com/mhitza/38fe96fb440daab28e57a50de47863d5" rel="noreferrer" class="gmail_msg" target="_blank">https://gist.github.com/mhitza/38fe96fb440daab28e57a50de47863d5</a> ), and I<br class="gmail_msg">
>>> also have 'ghc-pkg' wrapped in the same way with<br class="gmail_msg">
>>> a stack-ghc-pkg script (source<br class="gmail_msg">
>>> <a href="https://gist.github.com/mhitza/6c2b1978ef802707161041abe1d2699e" rel="noreferrer" class="gmail_msg" target="_blank">https://gist.github.com/mhitza/6c2b1978ef802707161041abe1d2699e</a> )<br class="gmail_msg">
>>><br class="gmail_msg">
>>> --<br class="gmail_msg">
>>> Google+: <a href="https://plus.google.com/111881868112036203454" rel="noreferrer" class="gmail_msg" target="_blank">https://plus.google.com/111881868112036203454</a><br class="gmail_msg">
>>><br class="gmail_msg">
>>> _______________________________________________<br class="gmail_msg">
>>> ghc-devs mailing list<br class="gmail_msg">
>>> <a href="mailto:ghc-devs@haskell.org" class="gmail_msg" target="_blank">ghc-devs@haskell.org</a><br class="gmail_msg">
>>> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" class="gmail_msg" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br class="gmail_msg">
>>><br class="gmail_msg">
>><br class="gmail_msg">
>> _______________________________________________<br class="gmail_msg">
>> ghc-devs mailing list<br class="gmail_msg">
>> <a href="mailto:ghc-devs@haskell.org" class="gmail_msg" target="_blank">ghc-devs@haskell.org</a><br class="gmail_msg">
>> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" class="gmail_msg" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
> _______________________________________________<br class="gmail_msg">
> ghc-devs mailing list<br class="gmail_msg">
> <a href="mailto:ghc-devs@haskell.org" class="gmail_msg" target="_blank">ghc-devs@haskell.org</a><br class="gmail_msg">
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" class="gmail_msg" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br class="gmail_msg">
><br class="gmail_msg">
</blockquote></div>