<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;">Thanks! It really helps.</div>
<div name="messageSignatureSection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;"><br />
Regards,
<div>Qingbo Liu</div>
</div>
<div name="messageReplySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;"><br />
On Dec 7, 2017, 12:31 -0500, Michael Snoyman <michael@snoyman.com>, wrote:<br />
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #1abc9c;">
<div dir="ltr">
<div>I'm not sure how it happened, but it looks like you ended up with some files in ~/.stack which are linked against a system-wide GHC. In particular:</div>
<div><br /></div>
<div>Library not loaded: /usr/local/opt/ghc/lib/ghc-8.<wbr />0.2/transformers-0.5.2.0/<wbr />libHStransformers-0.5.2.0-<wbr />ghc8.0.2.dylib</div>
<div><br /></div>
<div>The easiest way to fix this is to just wipe out your ~/.stack directory, which will result in having to do some recompiles, but otherwise should be harmless.<br /></div>
</div>
<div class="gmail_extra"><br />
<div class="gmail_quote">On Thu, Dec 7, 2017 at 7:05 PM, Quentin Liu <span dir="ltr"><<a href="mailto:quentin.liu.0415@gmail.com" target="_blank">quentin.liu.0415@gmail.com</a>></span> wrote:<br />
<blockquote class="gmail_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #e67e22;">
<div>
<div name="messageBodySection" style="font-size:14px;font-family:-apple-system,BlinkMacSystemFont,sans-serif">
<blockquote style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #3498db;">
<div dir="ltr"><span class="">What does this output: `which ghc ; stack exec which ghc`</span></div>
</blockquote>
`which ghc` gives "ghc not found”, while `stack exec which ghc` gives "/Users/HereWegoR/.stack/<wbr />programs/x86_64-osx/ghc-8.0.2/<wbr />bin/ghc”. <br />
<div><br /></div>
<div>
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #3498db;">
<div dir="ltr"><span class="">What does your stack.yaml look like?</span></div>
</blockquote>
For this file I don’t have any stack.yaml. I just wrote the file and tried to load it into ghci. </div>
<div><br /></div>
<div>
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #3498db;">
<div dir="ltr"><span class="">Do you have a .ghci or other kinds of local configuration file?</span></div>
</blockquote>
As far as I can tell, no. </div>
</div>
<div name="messageSignatureSection" style="font-size:14px;font-family:-apple-system,BlinkMacSystemFont,sans-serif"><br />
Regards,
<div>Qingbo Liu</div>
</div>
<div>
<div class="h5">
<div name="messageReplySection" style="font-size:14px;font-family:-apple-system,BlinkMacSystemFont,sans-serif"><br />
On Dec 7, 2017, 11:33 -0500, Michael Snoyman <<a href="mailto:michael@snoyman.com" target="_blank">michael@snoyman.com</a>>, wrote:<br />
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #3498db;">
<div dir="ltr">
<div>Some ideas:</div>
<div><br /></div>
<div>* What does this output: `which ghc ; stack exec which ghc`</div>
<div>* What does your stack.yaml look like?</div>
<div>* Do you have a .ghci or other kinds of local configuration file?<br /></div>
</div>
<div class="gmail_extra"><br />
<div class="gmail_quote">On Thu, Dec 7, 2017 at 5:42 PM, Quentin Liu <span dir="ltr"><<a href="mailto:quentin.liu.0415@gmail.com" target="_blank">quentin.liu.0415@gmail.com</a>></span> wrote:<br />
<blockquote class="gmail_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #d35400;">
<div>
<div name="messageBodySection" style="font-size:14px;font-family:-apple-system,BlinkMacSystemFont,sans-serif">I am using ghc download and managed by stack. My stack is of the latest version, which is 1.6.1. </div>
<div name="messageSignatureSection" style="font-size:14px;font-family:-apple-system,BlinkMacSystemFont,sans-serif"><br />
Regards,
<div>Qingbo Liu</div>
</div>
<div>
<div class="m_9064584380535744765h5">
<div name="messageReplySection" style="font-size:14px;font-family:-apple-system,BlinkMacSystemFont,sans-serif"><br />
On Dec 7, 2017, 01:56 -0500, Michael Snoyman <<a href="mailto:michael@snoyman.com" target="_blank">michael@snoyman.com</a>>, wrote:<br />
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #34495e;">
<div dir="ltr">
<div>What version of Stack are you using (stack --version), and how did you install Stack and GHC?</div>
<div><br /></div>
<div>It looks like you're using a system-wide GHC installation, which (for reasons like this) we by default no longer use by default in recent Stack releases.</div>
<div><br /></div>
<div>Upgrading to the latest Stack (via `stack upgrade` or following the instructions at [1]) will probably solve the problem.<br /></div>
<div><br /></div>
<div>[1] <a href="https://haskell-lang.org/get-started/osx" target="_blank">https://haskell-lang.org/get-s<wbr />tarted/osx</a><br /></div>
</div>
<div class="gmail_extra"><br />
<div class="gmail_quote">On Thu, Dec 7, 2017 at 8:43 AM, Quentin Liu <span dir="ltr"><<a href="mailto:quentin.liu.0415@gmail.com" target="_blank">quentin.liu.0415@gmail.com</a>></span> wrote:<br />
<blockquote class="gmail_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #2ecc71;">
<div>
<div name="messageBodySection" style="font-size:14px;font-family:-apple-system,BlinkMacSystemFont,sans-serif">Hi,
<div><br /></div>
<div>I was trying to use Parsec and imported Text.ParserCombinators.Parsec. I could call “stack ghc” to compile the file, but when I loaded the file into ghci and called any function, ghci would report errors</div>
<blockquote style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #9b59b6;">
<div>
<div>can't load .so/.DLL for: /Users/HereWegoR/.stack/snapsh<wbr />ots/x86_64-osx/lts-8.8/8.0.2/l<wbr />ib/x86_64-osx-ghc-8.0.2/libHSm<wbr />tl-2.2.1-BLKBelFsPB3BoFeSWSOYj<wbr />6-ghc8.0.2.dylib (dlopen(/Users/HereWegoR/.stac<wbr />k/snapshots/x86_64-osx/lts-8.8<wbr />/8.0.2/lib/x86_64-osx-ghc-8.0.<wbr />2/libHSmtl-2.2.1-BLKBelFsPB3Bo<wbr />FeSWSOYj6-ghc8.0.2.dylib, 5): Library not loaded: /usr/local/opt/ghc/lib/ghc-8.0<wbr />.2/transformers-0.5.2.0/libHSt<wbr />ransformers-0.5.2.0-ghc8.0.2.d<wbr />ylib</div>
<div>  Referenced from: /Users/HereWegoR/.stack/snapsh<wbr />ots/x86_64-osx/lts-8.8/8.0.2/l<wbr />ib/x86_64-osx-ghc-8.0.2/libHSm<wbr />tl-2.2.1-BLKBelFsPB3BoFeSWSOYj<wbr />6-ghc8.0.2.dylib</div>
<div>  Reason: image not found)</div>
</div>
<div><br /></div>
</blockquote>
<br />
<div>I tried to install transformers by calling `stack install transformers` but the problem still persisted. Is it because the version of transformers in my repo is different from the one referenced by `mtl` package? How should I fix it?</div>
</div>
<div name="messageSignatureSection" style="font-size:14px;font-family:-apple-system,BlinkMacSystemFont,sans-serif"><br />
Regards,
<div>Qingbo Liu</div>
</div>
</div>
<br />
______________________________<wbr />_________________<br />
Beginners mailing list<br />
<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br />
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bi<wbr />n/mailman/listinfo/beginners</a><br />
<br /></blockquote>
</div>
<br /></div>
______________________________<wbr />_________________<br />
Beginners mailing list<br />
<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br />
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" target="_blank">http://mail.haskell.org/cgi-bi<wbr />n/mailman/listinfo/beginners</a><br /></blockquote>
</div>
</div>
</div>
</div>
<br />
______________________________<wbr />_________________<br />
Beginners mailing list<br />
<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br />
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bi<wbr />n/mailman/listinfo/beginners</a><br />
<br /></blockquote>
</div>
<br /></div>
______________________________<wbr />_________________<br />
Beginners mailing list<br />
<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br />
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" target="_blank">http://mail.haskell.org/cgi-<wbr />bin/mailman/listinfo/beginners</a><br /></blockquote>
</div>
</div>
</div>
</div>
<br />
______________________________<wbr />_________________<br />
Beginners mailing list<br />
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br />
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr />bin/mailman/listinfo/beginners</a><br />
<br /></blockquote>
</div>
<br /></div>
_______________________________________________<br />
Beginners mailing list<br />
Beginners@haskell.org<br />
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners<br /></blockquote>
</div>
</body>
</html>