<div dir="ltr">There are a bunch of compat libraries such as base-compat and transformers-compat that will make your life a lot easier, having to maintain CPP yourself is very error prone.<div><br></div><div>HTH,</div><div>Adam</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, 13 Mar 2017 at 09:41 Alan & Kim Zimmerman <<a href="mailto:alan.zimm@gmail.com">alan.zimm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg">See also <a href="https://github.com/edsko/ghc-dump-tree/blob/master/buildall.sh" class="gmail_msg" target="_blank">https://github.com/edsko/ghc-dump-tree/blob/master/buildall.sh</a><br class="gmail_msg"></div><div class="gmail_extra gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg">On 13 March 2017 at 10:34, Alan & Kim Zimmerman <span dir="ltr" class="gmail_msg"><<a href="mailto:alan.zimm@gmail.com" class="gmail_msg" target="_blank">alan.zimm@gmail.com</a>></span> wrote:<br class="gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg">Once you have installed the various GHC compilers from HVR's PPA, you can do<br class="gmail_msg"><br class="gmail_msg"></div>cabal configure --with-compiler=ghc-7.10.3<br class="gmail_msg"><br class="gmail_msg"></div>etc<span class="m_4463294627894663817HOEnZb gmail_msg"><font color="#888888" class="gmail_msg"><br class="gmail_msg"><br class="gmail_msg"></font></span></div><span class="m_4463294627894663817HOEnZb gmail_msg"><font color="#888888" class="gmail_msg">Alan<br class="gmail_msg"></font></span></div><div class="gmail_extra gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg"><div class="m_4463294627894663817h5 gmail_msg">On 13 March 2017 at 10:28, Ertugrul Söylemez <span dir="ltr" class="gmail_msg"><<a href="mailto:esz@posteo.de" class="gmail_msg" target="_blank">esz@posteo.de</a>></span> wrote:<br class="gmail_msg"></div></div><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_msg"><div class="m_4463294627894663817h5 gmail_msg"><span class="gmail_msg">> Someone asked to add support in my lib for older version of GHC.<br class="gmail_msg">
> I know that there are GHC-version specific pragmas to activate the<br class="gmail_msg">
> code on specific version.<br class="gmail_msg">
><br class="gmail_msg">
> I'm not quite sure how to setup the environment to use several GHCs.<br class="gmail_msg">
> How do you do that kind of thing?<br class="gmail_msg">
<br class="gmail_msg">
</span>You can do it quite easily with Nix (which you can use alongside your<br class="gmail_msg">
normal package manager without interference, if you're not on NixOS).<br class="gmail_msg">
Type in your package's root directory:<br class="gmail_msg">
<br class="gmail_msg">
cabal2nix --shell > shell.nix<br class="gmail_msg">
<br class="gmail_msg">
Then you can build your package with various compiler versions:<br class="gmail_msg">
<br class="gmail_msg">
nix-build shell.nix --argstr compiler ghc803<br class="gmail_msg">
nix-build shell.nix --argstr compiler ghc7103<br class="gmail_msg">
nix-build shell.nix --argstr compiler ghcjs<br class="gmail_msg">
<br class="gmail_msg">
If a build is successful, you will get a symlink called 'result', which<br class="gmail_msg">
points to an installed version if your package including documentation.<br class="gmail_msg">
Once you're done testing, just delete that link.<br class="gmail_msg">
<br class="gmail_msg"></div></div><span class="gmail_msg">_______________________________________________<br class="gmail_msg">
Haskell-Cafe mailing list<br class="gmail_msg">
To (un)subscribe, modify options or view archives go to:<br class="gmail_msg">
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" class="gmail_msg" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br class="gmail_msg">
Only members subscribed via the mailman list are allowed to post.<br class="gmail_msg"></span></blockquote></div><br class="gmail_msg"></div>
</blockquote></div><br class="gmail_msg"></div>
_______________________________________________<br class="gmail_msg">
Haskell-Cafe mailing list<br class="gmail_msg">
To (un)subscribe, modify options or view archives go to:<br class="gmail_msg">
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" class="gmail_msg" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br class="gmail_msg">
Only members subscribed via the mailman list are allowed to post.</blockquote></div>