<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Thanks, I know if using “<font face="Courier New" class="">let</font>”, there’ll be no error. My question is:<div class="">1. what does option "<font face="Courier New" class="">—with-ghc</font>” do? </div><div class="">2. Is it better to remove “<font face="Courier New" class="">—with-ghc</font>” when running in intero REPL? If yes, how to remove it?</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 24, 2017, at 12:22 AM, baa dg <<a href="mailto:aquagnu@gmail.com" class="">aquagnu@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">try with "let":<br class=""></div><div class="">let f x y = x + y<br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">2017-05-23 17:04 GMT+03:00 乃潇 张 <span dir="ltr" class=""><<a href="mailto:zhangnaixiao@me.com" target="_blank" class="">zhangnaixiao@me.com</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">I find if I run “<font face="Courier New" class="">stack ghci intero</font>” (remove the “<font face="Courier New" class="">—with-ghc</font>”) from terminal, then the issue will not occur. Does anyone have idea why?<div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class=""><div class="h5"><div class="">On May 23, 2017, at 9:58 PM, 乃潇 张 <<a href="mailto:zhangnaixiao@me.com" target="_blank" class="">zhangnaixiao@me.com</a>> wrote:</div><br class="m_613588249055399846Apple-interchange-newline"></div></div><div class=""><div class=""><div class="h5"><div style="word-wrap:break-word" class="">Hi, I am trying to define some functions in a REPL window of emacs intero. However, I always got "<font face="Courier New" class="">parse error on input ‘=’</font>” as blow:<div class=""><br class=""></div><div class=""><div class=""><font face="Courier New" class="">Starting:</font></div><div class=""><font face="Courier New" class=""> stack ghci --with-ghc intero "--docker-run-args=--<wbr class="">interactive=true --tty=false" --no-build --no-load --ghci-options -odir=/Users/spike/Code/<wbr class="">haskell/learn-haskell/baby/.<wbr class="">stack-work/intero/intero445zea --ghci-options -hidir=/Users/spike/Code/<wbr class="">haskell/learn-haskell/baby/.<wbr class="">stack-work/intero/intero445zea baby</font></div><div class=""><font face="Courier New" class="">Intero 0.1.20 (GHC 8.0.2)</font></div><div class=""><font face="Courier New" class="">Type :intro and press enter for an introduction of the standard commands.</font></div><div class=""><font face="Courier New" class=""><br class=""></font></div><div class=""><font face="Courier New" class=""> addTwo x y = x + y</font></div><div class=""><font face="Courier New" class=""><br class=""></font></div><div class=""><font face="Courier New" class=""><interactive>:2:12: error:</font></div><div class=""><font face="Courier New" class=""> parse error on input ‘=’</font></div><div class=""><font face="Courier New" class=""> Perhaps you need a 'let' in a 'do' block?</font></div><div class=""><font face="Courier New" class=""> e.g. 'let x = 5' instead of 'x = 5’</font></div></div><div class=""><br class=""></div><div class="">I did some research, seems like “let” is not a must here for ghci version above 8.0. And my ghc version is 8.0.2. So is it a issue of ghci or intero?</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Sid</div></div></div></div>______________________________<wbr class="">_________________<br class="">Beginners mailing list<br class=""><a href="mailto:Beginners@haskell.org" target="_blank" class="">Beginners@haskell.org</a><br class=""><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" target="_blank" class="">http://mail.haskell.org/cgi-<wbr class="">bin/mailman/listinfo/beginners</a><br class=""></div></blockquote></div><br class=""></div></div><br class="">______________________________<wbr class="">_________________<br class="">
Beginners mailing list<br class="">
<a href="mailto:Beginners@haskell.org" class="">Beginners@haskell.org</a><br class="">
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank" class="">http://mail.haskell.org/cgi-<wbr class="">bin/mailman/listinfo/beginners</a><br class="">
<br class=""></blockquote></div><br class=""></div>
_______________________________________________<br class="">Beginners mailing list<br class=""><a href="mailto:Beginners@haskell.org" class="">Beginners@haskell.org</a><br class="">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners<br class=""></div></blockquote></div><br class=""></div></body></html>